db-sql icon indicating copy to clipboard operation
db-sql copied to clipboard

Use consistent datetime

Open LukasSkywalker opened this issue 5 years ago • 0 comments

The application uses different methods to get the current date and time. Some of them ignore the timezone, some of them not. The application should be consistent in the use of date and timestamps.

Method Result
Time.zone.now Time in timezone set by config.time_zone, UTC otherwise
DateTime.now Date & Time in system timezone; ignores config.time_zone

If users deploy the application and set the application time zone (config.time_zone), the expiry dates might be wrong.

LukasSkywalker avatar May 12 '20 10:05 LukasSkywalker