wood burning stoves 2.0*
The moose likes Java in General and the fly likes Time zone problem in date format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Time zone problem in date format" Watch "Time zone problem in date format" New topic

Time zone problem in date format

Bhupinder Dhillon
Ranch Hand

Joined: Oct 12, 2000
Posts: 124
Why does the following code produces different output on solaris with time zone set to 'TZ=Canada/Mountain':
When run in JDK 1.2.2
Date: Wed, 09 Jul 2003 13:06:44 GMT-06:00
and in 1.3.1_02
Date: Wed, 09 Jul 2003 12:06:25 MDT
Here's the code:

[ July 09, 2003: Message edited by: Bhupinder Dhillon ]
Jason Menard

Joined: Nov 09, 2000
Posts: 6450
I'm going to move this to Java in General - Intermediate.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
It is a bug that has been fixed and closed.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
I agree. Here's the link: http://aspose.com/file-tools
subject: Time zone problem in date format
Similar Threads
Comparing two dates
Time Zone Z associated with date
Date printed in IST format when EDT format required
Can't parse dates with full zone name
plz help with Calendar doubt.. ;-)