[ANN] TZ-Olson on SqueakMap

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] TZ-Olson on SqueakMap

David T. Lewis
TZ-Olson is an Olson time zone database for Squeak. It is now listed
on SqueakMap at http://map.squeak.org and maintained at
http://www.squeaksource.com/TimeZoneDatabase.

See https://en.wikipedia.org/wiki/Tz_database for background and general
information. The class comment for TimeZoneDatabase provides additional
details.

The Squeak Chronology package, especially class DateAndTime, represents time
in terms of magnitude (seconds relative to a Posix or Smalltalk reference
point) and offset from UTC, where the offset allows the DateAndTime to be
displayed relative to a local timezone. When combined with Olson time zone
tables, any instance of DateAndTime may be displayed for another time zone,
and a local time specification in any time zone may be used to create a
DateAndTime instance with correct magnitude.

TZ-Olson is a subset of the original TimeZoneDatabase package for Squeak,
and replaces it for Squeak images beginning with Squeak 5.3.

Examples:

To show the current time in central Europe:

   DateAndTime now inTimeZoneNamed: 'CET'

To create a DateAndTime for a local time in another time zone, accounting
for daylight savings time changes:

   DateAndTime
      year: 2013
      month: 3
      day: 31
      hour: 13
      minute: 17
      second: 19
      inTimeZoneNamed: 'CET'

To locate a suitable time zone:

   TimeZoneDatabase grepFor: 'CET'.
   TimeZoneDatabase grepFor: 'Detroit'.

To set the default time zone in the database to match that of your operating system:

   TimeZoneDatabase defaultLocation: 'CET'.
       
To inspect daylight savings transition times:

   TimeZoneDatabase defaultTimeZone dstTransitionTimes.


Dave

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] TZ-Olson on SqueakMap

Chris Muller-3
I didn't look at it, but cool!   :)

On Tue, Mar 12, 2019 at 7:16 AM David T. Lewis <[hidden email]> wrote:

>
> TZ-Olson is an Olson time zone database for Squeak. It is now listed
> on SqueakMap at http://map.squeak.org and maintained at
> http://www.squeaksource.com/TimeZoneDatabase.
>
> See https://en.wikipedia.org/wiki/Tz_database for background and general
> information. The class comment for TimeZoneDatabase provides additional
> details.
>
> The Squeak Chronology package, especially class DateAndTime, represents time
> in terms of magnitude (seconds relative to a Posix or Smalltalk reference
> point) and offset from UTC, where the offset allows the DateAndTime to be
> displayed relative to a local timezone. When combined with Olson time zone
> tables, any instance of DateAndTime may be displayed for another time zone,
> and a local time specification in any time zone may be used to create a
> DateAndTime instance with correct magnitude.
>
> TZ-Olson is a subset of the original TimeZoneDatabase package for Squeak,
> and replaces it for Squeak images beginning with Squeak 5.3.
>
> Examples:
>
> To show the current time in central Europe:
>
>    DateAndTime now inTimeZoneNamed: 'CET'
>
> To create a DateAndTime for a local time in another time zone, accounting
> for daylight savings time changes:
>
>    DateAndTime
>       year: 2013
>       month: 3
>       day: 31
>       hour: 13
>       minute: 17
>       second: 19
>       inTimeZoneNamed: 'CET'
>
> To locate a suitable time zone:
>
>    TimeZoneDatabase grepFor: 'CET'.
>    TimeZoneDatabase grepFor: 'Detroit'.
>
> To set the default time zone in the database to match that of your operating system:
>
>    TimeZoneDatabase defaultLocation: 'CET'.
>
> To inspect daylight savings transition times:
>
>    TimeZoneDatabase defaultTimeZone dstTransitionTimes.
>
>
> Dave
>