Closed hugy718 closed 1 year ago
@liuchangshiye Please add the test that you are working on which uses seconds as age granularity as a unit test later.
@liuchangshiye please add a fine-grained processing unit test sample, like using 5 seconds for a cohort selection. Then we can merge this before moving on to handling years and month in a separate PR.
Problem
Refer to issue #134 . This PR is a fix for that
Solution
Internally, action time are integers that is
seconds from epoch
. Age selection calculates the difference of two action time that is created from theirseconds from epoch
integer. The age selector already supported calculation of difference in different units, but previously it assumes the time is in the granularity of day. It has been updated.Fixed a bug in the default
DayIntConverter
. Previously, the action time parsing do not consider the time zone, which was not a problem when we only consider days. Fixed that by treating the input action time as time in UTC time zone. More time formats can be supported by extendingActionTimeIntConverter
interface.The breaking tests are fixed and all existing tests passes.