On Sunday 15 August 2010 03:17:27 Shin Fujishiro wrote:
> Jonathan M Davis <[email protected]> wrote:
> > In any case, ideally, whatever we do for time/date in Phobos is in UTC
> > internally and properly handles conversions to other timezones upon
> > request, but it isn't ever actually in another timezone internally.
> 
> Thank you for the detailed description!  Now I convinced that the
> time value must be held in UTC always.
> 
> Then, if I understand correctly, the time object must hold a UTC time
> value alongside timezone information.
> 
> struct Time
> {
>     ulong utc;
>     Timezone tz;
> }
> 
> ... and timezone conversions are done by just replacing the tz member.
> 
> 
> Shin

Yes. That's basically what you do. The key is to never actually convert 
whatever 
you're using to hold time (be it a time_t or whatever) into the local time 
zone. 
It must stay in UTC.

- Jonathan M Davis
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to