[squeak-dev] The Inbox: Kernel-cmm.669.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun Feb 5 21:46:42 UTC 2012


2012/2/4  <commits at source.squeak.org>:
> A new version of Kernel was added to project The Inbox:
> http://source.squeak.org/inbox/Kernel-cmm.669.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-cmm.669
> Author: cmm
> Time: 3 February 2012, 5:55:11.175 pm
> UUID: 5ddec343-01ad-4e76-b32c-299fac68ec09
> Ancestors: Kernel-eem.668
>
> Introduced Timespan class>>defaultOffset.  This is the offset that will be used for creation of all Timespans when an offset is not specified.  When an offset is specified or involved in construction or calculation, the result is now produced in terms of the source offset.
>        For example, Date today now produces a globalized date by default.  However, "Date starting: (DateAndTime year: 2004 month: 2 day: 29 hour: 13 minute: 33 second: 0 offset: 2 hours)" produces a Date.whose start is expressed in terms of UTC+2.
>        The default defaultOffset is Duration zero so that Squeak will have fast, globalized Dates out of the box.  Globalized Dates are common for applications.
>        Legacy localized Dates can be obtained by evaluating "Date localize" so that, when an offset is not specified or otherwise involved in the input, the local offset will be used.
>
> =============== Diff against Kernel-eem.668 ===============
>
SNIP...
>
> Item was changed:
>  ----- Method: DateAndTime>>asSeconds (in category 'smalltalk-80') -----
>  asSeconds
>        "Return the number of seconds since the Squeak epoch"
> +       ^ (self - (self class epoch offset: offset)) asSeconds!
> -
> -       ^ (self - (self class epoch)) asSeconds!
>
OK, I see why you changed this one, just to preserve the fact that
DateAndTime epoch is local time zone sensitive...
But why was it so? Anyone has a good rationale?

Nicolas


More information about the Squeak-dev mailing list