COOL-cohort / COOL

the source code of the COOL system
https://www.comp.nus.edu.sg/~dbsystem/cool/
Apache License 2.0
44 stars 15 forks source link

process the time in a more fine-grained manner #134

Closed KimballCai closed 1 year ago

KimballCai commented 1 year ago

we can support the time in the "%d/%m/%Y" format, and we need to support a more fine-grained format, i.e., "%d/%m/%Y %H:%M:%S"

hugy718 commented 1 year ago

I have looked into the current implementations on age selection. Actually they are using a date time object to calculate the difference on a given time unit. But action time input are stored as day since epoch in COOL. That prevents us from moving to hours, minutes and seconds.

The fix is that we switch the action time integer from days since epoch to seconds since epoch and update the conversions and diff calculations for age.

hugy718 commented 1 year ago

Support for more formats of action time can be supported by extension of ActionTimeIntConverter interface implementing custom conversion to an integer representing seconds since epoch.