Bug 9488 – std.datetime unittest failure

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2013-02-09T03:01:01Z
Last change time
2019-11-20T14:28:50Z
Assigned to
No Owner
Creator
yazan.dabain

Comments

Comment #0 by yazan.dabain — 2013-02-09T03:01:01Z
Running the phobos unittests, a failure in std.datetime line 1501 was reported. Local timezone is Asia/Amman. Changing the timezone makes the test pass. Running on Fedora 18. core.exception.AssertError@std/datetime.d(1501): [1999-Jul-31 01:00:00] [1999-Jul-31 00:00:00] ---------------- generated/linux/debug/64/unittest/std/datetime(onUnittestErrorMsg+0x46) [0x877132] generated/linux/debug/64/unittest/std/datetime(_d_unittest_msg+0x45) [0x86a72d] generated/linux/debug/64/unittest/std/datetime(void std.datetime.SysTime.__unittestL1466_27()+0x1320) [0x5b8854] generated/linux/debug/64/unittest/std/datetime(void std.datetime.__modtest()+0x81) [0x864615] generated/linux/debug/64/unittest/std/datetime(extern (C) bool core.runtime.runModuleUnitTests().int __foreachbody327(ref object.ModuleInfo*)+0x30) [0x87745c] generated/linux/debug/64/unittest/std/datetime(int rt.minfo.moduleinfos_apply(scope int delegate(ref object.ModuleInfo*))+0x55) [0x86f265] generated/linux/debug/64/unittest/std/datetime(runModuleUnitTests+0xae) [0x8772f6] generated/linux/debug/64/unittest/std/datetime(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll()+0x22) [0x86ae5a] generated/linux/debug/64/unittest/std/datetime(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x86a96a] generated/linux/debug/64/unittest/std/datetime(_d_run_main+0x1a8) [0x86a924] generated/linux/debug/64/unittest/std/datetime(main+0x17) [0x86a777] /lib64/libc.so.6(__libc_start_main+0xf5) [0x3e8f221a05] make[1]: *** [generated/linux/debug/64/unittest/std/datetime] Error 1 make: *** [unittest] Error 2
Comment #1 by issues.dlang — 2013-02-09T17:14:11Z
I very much doubt that there's any real bug here (tests like this are notoriously hard to write in a way that works across all time zones), but I'll try and find time to look into it.
Comment #2 by issues.dlang — 2013-02-09T17:43:06Z
It looks like the problem is the fact that Asia/Amman had a DST switch on July 1st, 1999. I didn't think that anyone had DST switches in July. They're always in Spring or Fall. Yuck. Okay. It's definitely not a bug in std.datetime itself. It'll work fine. It's a bug in the tests. I'll have to figure out how to fix them that works across more (preferably all) time zones.
Comment #3 by yazan.dabain — 2013-02-11T06:53:13Z
I thought so too, but I wanted to make sure that it wasn't some edge case or something. (btw, we need to find a way to enable running the rest of the unit-tests even if one fails. But that's an issue for another ticket) Thanks for you efforts.
Comment #4 by bugzilla — 2019-11-19T18:18:20Z
For reference: The broken assertion moved meanwhile to systime.d, line 1464. Nothing has changed there and I doubt, that this will be fixed.
Comment #5 by i6o34a+7y7j1p606trkc — 2019-11-19T18:35:09Z
Nope. *** This issue has been marked as a duplicate of issue 19116 ***
Comment #6 by dlang-bugzilla — 2019-11-20T14:28:50Z
Undoing vandalism(?) by Parmigiano