Bug 17732 – SysTime.init.toString segfaults because timezone is null
Status
RESOLVED
Resolution
DUPLICATE
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-08-08T09:31:31Z
Last change time
2017-08-22T21:14:50Z
Assigned to
No Owner
Creator
Martin Nowak
Comments
Comment #0 by code — 2017-08-08T09:31:31Z
Fairly surprising, e.g. for default initialized structs.
Not sure why some overloads in std.datetime.systime take
immutable TimeZone tz = null
why others use
immutable TimeZone tz = LocalTime()
.
Fixing this bug would be trivial by moving the already used
tz is null ? LocalTime() : tz;
logic into the `timezone` accessor.
Comment #1 by issues.dlang — 2017-08-22T21:14:50Z
*** This issue has been marked as a duplicate of issue 12507 ***