Joda DateTimeZone enum

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Joda DateTimeZone enum

Steve Roy
Hi,

Is there a reason enums weren't created for the timezones?  Although there is some flux to the underlying data, it seems that the String based identification invites the opportunity for typos and other errors for well known and established timezones.

- steve

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Joda-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/joda-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Joda DateTimeZone enum

jodastephen
Since time-zones are essentially just data passed in, there is no
guarantee that the TZDB ones are actually loaded, so a constant may be
misleading. Plus, there is no guarantee that TZDB might not just
change all the IDs.

Not having constants still seems like the right choice many years later.

Stephen





On 15 February 2015 at 13:42, Steve Roy <[hidden email]> wrote:

> Hi,
>
> Is there a reason enums weren't created for the timezones?  Although there
> is some flux to the underlying data, it seems that the String based
> identification invites the opportunity for typos and other errors for well
> known and established timezones.
>
> - steve
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Joda-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Joda-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/joda-interest
Loading...