[squeak-dev] Unix Time

Mike Hales mike.hales at kscape.com
Fri Jan 15 15:18:29 UTC 2010


That is beautiful! I wake up check my email, it's in the trunk, I hit the
update button, go to my workspace and try it, it works.

Awesome, thanks.

Mike

Mike Hales
Engineering Manager
KnowledgeScape
www.kscape.com


On Fri, Jan 15, 2010 at 5:11 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:

> On 15.01.2010, at 05:26, Mike Hales wrote:
> > Is there any protocol in the DateAndTime hierarchy that returns the unix
> time? I want the equivalent of typing "date +%s" on the command line.
>
> In the latest trunk image, there now is #asUnixTime :)
>
> On 15.01.2010, at 12:16, Bert Freudenberg wrote:
> >
> > http://tinlizzie.org/updates/etoys/updates/2092LocalePluginAddins-tpr.cs
> > http://tinlizzie.org/updates/etoys/updates/2106chronologyUnix-bf.cs
>
> I just committed these to trunk, with one modification to the startup - the
> timezone is set unconditionally (independent of useLocale).
>
> The timezone is only set on startup. So restart the image or evaluate
> "Locale startUp: true".
>
> before:
>
> DateAndTime now
> ==> 2010-01-15T12:23:35.301+00:00
>
> after:
>
> DateAndTime now
> ==> 2010-01-15T12:24:02.452+01:00
>
> (note the last four digits which are the local time offset)
>
> DateAndTime now asUnixTime
> ==> 1263554652
>
> - Bert -
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100115/67fb2967/attachment.htm


More information about the Squeak-dev mailing list