Hi Dave,

On 2012-12-01, at 22:14, "David T. Lewis" <[email protected]> wrote:

> I wanted to see if I can update TimeZoneDatabase (Olson tz data) for Pharo
> 2.0, but I am encountering a basic time conversion issue. I don't know the
> background on the Chronology changes in Pharo, so I'll just try to describe
> the issue as I understand it:

yes we did a big refactoring in 2.0 since the whole time-zone + DateAndTime 
stuff was severely broken. Moving images from one timezone to another would 
break all times :P (luckily this happens only twice per year, when moving to 
daylight saving time)

> I am in Michigan, so my time zone offset is 5 hours:
> DateAndTime now offset ==> -0:05:00:00
> 
> Pharo 2.0 does this (wrong):
> DateAndTime now - (DateAndTime fromSeconds: DateAndTime totalSeconds) ==> 
> 0:05:00:00.334
> 
> Previously it did this (right):
> DateAndTime now - (DateAndTime fromSeconds: DateAndTime totalSeconds) ==> 
> 0:00:00:00.444
> 
> Explanation:
> #totalSeconds reports seconds in local time, but #fromSeconds: in
> Pharo 2.0 is using UTC. One or the other of these must be wrong. 
> 
> Possible fix(?):
> Newer VMs have primitives that report UTC time. Use one of these instead of
> the local time primitive currently being used.

Yes, so our idea, and I think we are definitely right on that, is that all 
times use
internally UTC. Time-zones are purely for displaying reasons :).

=> totalSeconds is wrong! (at least at the first glance).

could you open a bug report for this?

Reply via email to