Currently, the badge expects (and returns) UTC time. However, the server code saves the datetime in local time, without time zone information.
While the code converts to and from UTC, it is better to use pytz (and tzlocal), and save the time zone as part of the date. Or, alternatively, save all dates in UTC
Currently, the badge expects (and returns) UTC time. However, the server code saves the datetime in local time, without time zone information.
While the code converts to and from UTC, it is better to use pytz (and tzlocal), and save the time zone as part of the date. Or, alternatively, save all dates in UTC
https://julien.danjou.info/blog/2015/python-and-timezones
http://stackoverflow.com/questions/13218506/how-to-get-system-timezone-setting-and-pass-it-to-pytz-timezone