[squeak-dev] Unix Time
David T. Lewis
lewis at mail.msen.com
Fri Jan 15 06:11:20 UTC 2010
On Thu, Jan 14, 2010 at 09:26:34PM -0700, 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.
No, Squeak inherently uses local time with naive time zone representation.
If you are looking for seconds since the posix epoch, then see:
Then set your time zone and use "PointInTime now asPosixSeconds"
or "DateAndTime now asPointInTime asPosixSeconds".
More information about the Squeak-dev