Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Parsing dates and daylight savings time
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Paul J. Lucas, post: 3771137"] Given: SimpleDateFormat df = new SimpleDateFormat( "yyyy:MM:dd HH:mm:ss" ); String s = "2007:02:04 19:29:50"; Date d = df.parse( s ); what I want to happen is that, since the date format does not contain a timezone, I want it to be taken to be in the host's local timezone. I am in the Pacific timezone with daylight savings time in effect. Yet when I print d using Date.toString(), I get: Sun Feb 04 19:29:50 PST 2007 Why is it PST? It should be PDT. The result of: TimeZone.getDefault().useDaylightTime() is true. How do I fix this so that daylight savings time is correctly taken into account? - Paul [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Parsing dates and daylight savings time
Top