[squeak-dev] Re: How to have a fast and usable Date? (was: new Bug in Locale)

David T. Lewis lewis at mail.msen.com
Sat Feb 4 14:30:01 UTC 2012

On Thu, Feb 02, 2012 at 04:01:18PM -0500, David T. Lewis wrote:
> p.s. I just ran the unit tests for TimeZoneDatabase and see new
> failures, but only when running on the standard interpreter. Did
> we change something in the image in a Cog-dependent way? I'll track
> it down as soon as I get some time but if someone can point me to
> the answer I'd appreciate it.


To follow up on my own question, the failing tests in TimeTransformTest
are due to an issue in my own unit tests, as opposed to something that
was changed in the Squeak image. Sorry for the noise.

I have not decided how to handle it this properly yet, but the failing
tests all involve calculated differences of 23 seconds, which happens to
be the number of leap seconds that have transpired since the Posix epoch.
My Linux computer is set to use time zone tables that ignore leap seconds,
and some of my unit tests are doing calculations with a time zone table
that does uses leap seconds, hence the 23 second difference. The problem
is exposed when I use primitiveUtcWithOffset to obtain seconds since the
epoch from the operating system, then compare that value with my calculated
value from the other time zone table (that calculation is based on Squeak
time, which originates from a seconds clock reported in local time rather
than UTC). The Cog VMs do not support primitiveUtcWithOffset, so I am able
to see the problem only when running on an interpreter VM.

I'll fix this in the TimeZoneDatabase package once I figure out the right
way to handle the issue. It is not an problem caused by any Squeak image
or VM.


More information about the Squeak-dev mailing list