[Pharo-project] What can be negative regarding timezones with date-related objects?

Sven Van Caekenberghe sven at beta9.be
Sat Jun 9 08:53:03 EDT 2012


On 09 Jun 2012, at 14:24, Mariano Martinez Peck wrote:

> The seconds/nanoseconds are always positive when normalized.
> 
> Are you sure?
> I have just changed (for testing) to this:
> 
>     DateAndTime localTimeZone: (TimeZone timeZones detect: [:tz | tz abbreviation = 'EST']).
> 
> And now if I do:
> 
> DateAndTime now offset asSeconds ---->   -18000

The seconds/nanoseconds in DateAndTime itself are like that,
the TZ offset can be positive and negative:

http://en.wikipedia.org/wiki/Timezone

<<Most of the 40 time zones on land are offset from Coordinated Universal Time (UTC) by a whole number of hours (UTC−12 to UTC+14), but a few are offset by 30 or 45 minutes.>>






More information about the Pharo-dev mailing list