SysTime.toISOExtString with timezone offset
Jack Applegame via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Apr 20 01:10:40 PDT 2015
I need current system time ISO string with timezone offset. For
example
"2015-04-20T11:00:44.735441+03:00"
but Clock.currTime.toISOExtString doesn't write offset:
"2015-04-20T11:00:44.735441+03:00"
I found workaround, but it looks redundant and needs memory
allocation:
auto t = Clock.currTime;
t.timezone = new immutable SimpleTimeZone(t.utcOffset);
writeln(t.toISOExtString);
Is there a simple way to get time ISO string with timezone offset?
More information about the Digitalmars-d-learn
mailing list