Another case to consider :

(3) Multiple-time-zone travel applications, where a journey occurs from a
location in timezone A to a location in timezone B.  In this case, I store
UTC in the database, and I store a timezone for each location in the
database.  Then when showing the journjey, each timestamp is displayed in
its location's timezone, therefore showing as local time where you are
departing from or arriving to.

Cameron

On Thu, Aug 28, 2008 at 9:12 AM, Josh Berkus <[EMAIL PROTECTED]> wrote:

> Giuseppe,
>
>  I'd say that adding (non compulsory) TZ information to the datetime
>> field is going to be good for users.
>>
>
> The only case where it makes sense to *store* the time zone information in
> the field is when, for some bizarre reason, we want to know time zone a time
> was recorded in, but will also have multiple users from multiple time zones
> recording times, and don't want to see times recorded by other users in
> their own local times.  In 13 years of database work, I've never encountered
> such a use case.
>
> The use cases I have encountered, many times, are:
>
> (1) Single-time-zone micro-applications: when the user doesn't want to be
> bothered with time zones because they're 100% in a single time zone.  These
> users want "Timestamp Ignoring Time Zone" where timestamps are treated like
> they are always in UTC.
>
> (2) Multiple-time-zone applications, where each user wants to see the data
> in their *own* time zone.  In this case, the *client protocol or driver*
> should accept timestamps with time zones, convert them to UTC, and store
> them.  On retrieval, the timestamps should again be converted by the
> client/driver into the local time zone of the user, unless the user asks for
> the timestamp in some other time zone.
>
> In neither case does it make any sense to store the "recorded" time zone in
> the database.
>
> Some of you will find the above timestamp logic quite familiar from another
> database product.  I am biased towards that implementation because I helped
> develop it, based directly on my development of 3 different calendaring
> applications.
>
> --Josh
>
>
> _______________________________________________
> Mailing list: 
> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss>
> Post to     : [email protected]
> Unsubscribe : 
> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss>
> More help   : https://help.launchpad.net/ListHelp
>
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to