Time zone defaults

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

Time zone defaults

Mark Carroll
I don't seem to be able to figure out how to change the default time
zone but then to restore it back to how it was: if I use
DateTimeZone.getDefault to note the previous, how do I know if it really
was set, or if it was null and the JDK time zone is showing through?

Admittedly, I suspect many applications really won't care if their Joda
operations are affected by a mid-process JDK time zone default change
happening under their feet, I'm just trying to make my unit tests brutal
but each still leaving the system as it found it so I thought I should
mention this tiny apparent gap in the API.

--
Mark Carroll
Software Engineer
[hidden email]
http://www.vecna.com/

Cambridge Research Laboratory
Vecna Technologies, Inc.
36 Cambridge Park Drive
Cambridge, MA 02140
Phone: (617) 864-0636
Fax: (617) 864-0638

Better Technology, Better World (TM)

The contents of this message may be privileged and confidential.
Therefore, if this message has been received in error, please delete it
without reading it. Your receipt of this message is not intended to
waive any applicable privilege. Please do not disseminate this message
without the permission of the author.

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
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: Time zone defaults

jodastephen
Yes, there porbably is a gap in the API here, but frankly if you
change the default time zone galf way through an application its your
lookout!

Right now, the only way to work with this is to fork the code and edit
it, or use reflection.

Stephen


On 31 August 2011 17:19, Mark Carroll <[hidden email]> wrote:

> I don't seem to be able to figure out how to change the default time
> zone but then to restore it back to how it was: if I use
> DateTimeZone.getDefault to note the previous, how do I know if it really
> was set, or if it was null and the JDK time zone is showing through?
>
> Admittedly, I suspect many applications really won't care if their Joda
> operations are affected by a mid-process JDK time zone default change
> happening under their feet, I'm just trying to make my unit tests brutal
> but each still leaving the system as it found it so I thought I should
> mention this tiny apparent gap in the API.
>
> --
> Mark Carroll
> Software Engineer
> [hidden email]
> http://www.vecna.com/
>
> Cambridge Research Laboratory
> Vecna Technologies, Inc.
> 36 Cambridge Park Drive
> Cambridge, MA 02140
> Phone: (617) 864-0636
> Fax: (617) 864-0638
>
> Better Technology, Better World (TM)
>
> The contents of this message may be privileged and confidential.
> Therefore, if this message has been received in error, please delete it
> without reading it. Your receipt of this message is not intended to
> waive any applicable privilege. Please do not disseminate this message
> without the permission of the author.
>
> ------------------------------------------------------------------------------
> Special Offer -- Download ArcSight Logger for FREE!
> Finally, a world-class log management solution at an even better
> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
> download Logger. Secure your free ArcSight Logger TODAY!
> http://p.sf.net/sfu/arcsisghtdev2dev
> _______________________________________________
> Joda-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Joda-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/joda-interest
Loading...