Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTimeZone.GetSystemDefault seems unuseful #61

Closed
GoogleCodeExporter opened this issue Mar 15, 2015 · 7 comments
Closed

DateTimeZone.GetSystemDefault seems unuseful #61

GoogleCodeExporter opened this issue Mar 15, 2015 · 7 comments
Labels
Milestone

Comments

@GoogleCodeExporter
Copy link

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

@GoogleCodeExporter
Copy link
Author

Original comment by malcolm.rowe on 18 Apr 2012 at 9:07

  • Changed state: New

@GoogleCodeExporter
Copy link
Author

Original comment by malcolm.rowe on 13 Jul 2012 at 8:52

  • Added labels: V1-Blocker

@GoogleCodeExporter
Copy link
Author

Original comment by malcolm.rowe on 14 Jul 2012 at 8:53

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Per discussion, we're going to remove GetSystemDefaultOrNull() and clarify the 
documentation for GetSystemDefault().

Original comment by malcolm.rowe on 27 Jul 2012 at 12:44

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision bcc19cf8038f.

Original comment by malcolm.rowe on 27 Jul 2012 at 4:38

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Original comment by malcolm.rowe on 30 Jul 2012 at 7:26

  • Added labels: Milestone-1.0
  • Removed labels: V1-Blocker

@GoogleCodeExporter
Copy link
Author

Original comment by malcolm.rowe on 10 Nov 2012 at 10:20

  • Added labels: Milestone-1.0.0
  • Removed labels: Milestone-1.0

@malcolmr malcolmr added the bug label Mar 15, 2015
@malcolmr malcolmr modified the milestone: 1.0.0 Mar 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants