From ba7d70b85802e5626708545c96e38f91fcf5c341 Mon Sep 17 00:00:00 2001 From: jmdavis Date: Sun, 5 Jun 2011 23:23:10 -0700 Subject: [PATCH] Fix for issue 6113. I really should have made those static constructors shared in the first place, since immutable class and global variables are implicitly shared. --- changelog.dd | 1 + std/datetime.d | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.dd b/changelog.dd index 546ec177f..88a166901 100644 --- a/changelog.dd +++ b/changelog.dd @@ -9,5 +9,6 @@ $(VERSION 054, ddd mm, 2011, =================================================, $(LI $(BUGZILLA 3479): writef/writefln: positional precision not working) $(LI $(BUGZILLA 3564): Rdmd failing to link external C libraries) $(LI $(BUGZILLA 3752): File.byLine fetches lines in a confusing manner) + $(LI $(BUGZILLA 6113): singletons in std.datetime are not created early enough) ) ) diff --git a/std/datetime.d b/std/datetime.d index 3c73b38be..3b9007913 100644 --- a/std/datetime.d +++ b/std/datetime.d @@ -28359,7 +28359,7 @@ private: static immutable LocalTime _localTime; - static this() + shared static this() { tzset(); @@ -28483,7 +28483,7 @@ private: static immutable UTC _utc; - static this() + shared static this() { _utc = new immutable(UTC)(); }