www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17732] New: SysTime.init.toString segfaults because timezone

https://issues.dlang.org/show_bug.cgi?id=17732

          Issue ID: 17732
           Summary: SysTime.init.toString segfaults because timezone is
                    null
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

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.

--
Aug 08 2017