-
Notifications
You must be signed in to change notification settings - Fork 344
Closed
Description
DateTimeZone.GetSystemDefault() warns that it can arbitrarily throw
TimeZoneNotFoundException, and points to the null-coalescing operator and
GetSystemDefaultOrNull() as a solution.
Given that, it seems that GetSystemDefault() isn't actually something you'd
actually ever want to call.
We should probably support one pattern for getting the system-default time
zone, rather than two that both need exceptional handling.
Quite how we do that, I'm not sure: perhaps provide
GetSystemDefaultOrSomethingReasonable() [though I assume there are conditions
under which there _is_ nothing reasonable?], or perhaps instead remove
GetSystemDefaultOrNull() and make the conditions under which GetSystemDefault()
can throw effectively ignorable (i.e. the "something's gone badly wrong" bucket
rather than the "it turns out I don't support that" bucket).
Original issue reported on code.google.com by malcolm.rowe on 18 Apr 2012 at 8:54