On 2/28/07, Chris McKeever <[EMAIL PROTECTED]> wrote:
Does anyone have any resources, guides, insight into the best practice for storing date/time information when developing a custom web app? I am mainly concerned with how the TZ should be stored? Should it go in as UTC and the code accounts for the user TZ? How does one handle tracking the users Daylight Savings etc
Best practice is that all times maintained in a database (or anywhere on the server) are UTC, and are only converted to local timezone and/or adjusted to daylight savings time as required to display data for a specific user. This means, for example, that Randy in California and Sven in Sweden (different users on the same system) will see the same record from a database displayed with different times (because the time is converted to their local timzone before display). Now, as far as the best way to implement the two paragraphs above (especially with DST), I have not a clue.