Forum OpenACS Development: Re: Timezones

Collapse
8: Re: Timezones (response to 1)
Posted by Eduardo Pérez on
Timezones are just a human invention. All Unix servers must know UTC via time() or gettimeofday() system calls. Timezones are only used to display dates in the format the user wants.

So, date/times are always saved in UTC in the DB. And formated to the user with a format and timezone the user wants.

Server timezone doesn't have any meaning. A user can access a server anywhere in the world and the user wants to compare dates in the local timezone or in UTC.

The openacs.org server has a problem here, by default it outputs dates in an unknown timezone and it should use UTC since is not specified.

Server timezone is a default setting for the users of a system when only a local group of users will use that server.

So, the system interfaces should always return UTC date/times and you only use a timeformat and timezone when printing a date/time to html according to current user config.