UTCDateAndTime

Summary: UTC based implementation of DateAndTime with instance variables for POSIX magnitude and TZ offset
Author: David T. Lewis
Owner: Dave Lewis (dtl)
Co-maintainers: <None>
Categories:
Homepage: http://wiki.squeak.org/squeak/6197
PackageInfo name: Chronology-core
RSS feed:

Description:

CAUTION - Installation cannot be unloaded, save your image before loading this package.

Note: As of January 2019 this project has been merged in Squeak trunk in package Chonology-Core. This SqueakMap entry can still be loaded in Squeak 5.2, but only after updating that Squeak 5.2 image to the latest version from its squeak52 update stream. Interested users are strongly encouraged to use the normal Squeak trunk update stream instead of loading UTCDateAndTime from this SqueakMap entry (dtl January 2018).

The traditional implementation of DateAndTime uses instance variables 'seconds offset jdn nanos' and calculates its magnitude based on those variables in conjunction with the local TimeZone.

Replace this with an implementation using instance variables 'utcMicroseconds localOffsetSeconds'. This represents time magnitude as elapsed microseconds since the Posix epoch, with localOffsetSeconds representing local offset from UTC. The magnitude is used for comparison and duration calculations, and the local offset is used for displaying this magnitude in the context of a local time zone.

Releases


Back