Skip to content
Snippets Groups Projects

Function get_nearest_time() behaves as expected now

All threads resolved!
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -313,7 +313,7 @@ def test_get_nearest__oneday_average():
f = FilterAlgorithm(input_sample_period=60.0, output_sample_period=86400.0)
step = f.get_filter_steps()[0]
time = UTCDateTime("2020-08-20T01:00:00")
aligned = get_nearest_time(step=step, output_time=time)
aligned = get_nearest_time(step=step, output_time=time, left=False)
# filter is average for day, should be first/last minute samples of 2020-08-20
assert_equal(aligned["data_start"], UTCDateTime("2020-08-20T00:00:00"))
assert_equal(aligned["time"], UTCDateTime("2020-08-20T11:59:30"))
Loading