[dmd-internals] Status of dmd pull requests
Jonathan M Davis
jmdavisProg at gmx.com
Sun Sep 4 00:39:10 PDT 2011
On Sunday, September 04, 2011 17:19:18 Jonathan M Davis wrote:
> On Sunday, September 04, 2011 17:05:20 Daniel Murphy wrote:
> > Sydney (+10 ?)
> > ~$ cat /etc/timezone
> > Australia/NSW
>
> *Sigh* It looks like something is messed up with std.datetime dealing with
> that timezone. It looks like I get to go bug hunting...
LOL. Ouch. _That_ was dumb of me. I was trying to get the order of several
time zones (including local time) in the tests, and somehow I managed to
forget that diffing times ignores time zones (as it should). So, I subtracted
the current time in UTC from the current time in local time (which inevitably
is a matter of microseconds, because it's just the difference between two calls
to Clock.currTime). The result is inevitably positive. West of UTC (as I and
the autotester are) needs the result to be positive to order the time zones
correctly, whereas east of UTC (as you are) needs the result to be negative -
but it's positive. So, the time zones are in the wrong order for you, and the
results are wrong. _This_ is why I like it when unit tests are dead stupid
rather than trying to be clever and concise. It's so easy to screw them up
when you try and be clever and concise. But no one likes the large number of
dead stupid unit tests in std.datetime, so I've been trying to make them
clever and concise. Bleh.
Oh well. At least I know what the problem is now. It shouldn't take very long
to fix it.
- Jonathan M Davis
More information about the dmd-internals
mailing list