[squeak-dev] Re: Date tomorrow - Date today "0:19:00:00"
slp5591 at me.com
Tue Jul 3 15:59:22 UTC 2012
Just a bad reference to localOffset rather than the supplied offset in
todayAtNanoSeconds:offset: (see below). Normally,
todayAtMilliSeconds:offset: is called. The nanoSecond version is only used
when a the call to nowWithOffset: results in the same tick value as the last
one. This is what happens when you try to subtract tomorrow from today.
Today ends up with a local offset. Changing the reference to aDuration fixes
the problem. Doesn't help with the TestRunner chronology failures. I'll have
a look at them.
todayAtNanoSeconds: nanoSecondsSinceMidnight offset: aDuration
"This is usually only during system startup..."
^ self basicNew
seconds: (nanoSecondsSinceMidnight // 1000000000)
nano: (nanoSecondsSinceMidnight \\ 1000000000 )
offset: *self localOffset*
View this message in context: http://forum.world.st/Date-tomorrow-Date-today-0-19-00-00-tp4637024p4637947.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev