It's not a secret anymore!
The moose likes Java in General and the fly likes Date Displaying issue Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Date Displaying issue" Watch "Date Displaying issue" New topic
Author

Date Displaying issue

Prashant Vasudeo
Ranch Hand

Joined: Mar 25, 2003
Posts: 38
I have a Orace DB in India. one field is Date. This field value is inserted from a stored procudure. I mean java code is not providing this date value.

I get the Date value in following way
1. get Result Set
2. using resultset metadata, if my datatype is timestamp (i.e. Date)
then create a new Date object.
java.sql.Timestamp timestamp = (Timestamp) date;
return new Date(timestamp.getTime());

I am displaying this data using Date.toString() with Date formatter as "EEE, MMM d 'at' HH:mm:ss z"

Problem Desc ::
When i run my application server in India
It shows me TimeZone as IST
From one week when i run my application server in EU-London
all dates from one week, Its showing TimeZone as BST (British Summer Time)
But dates before one weeks, shows in GMT

Any help ?

Prashant
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Date Displaying issue
 
Similar Threads
Date according to timezone
Encountering a DateTime problem while displaying a date using Jexcel
Timestamp advanced 4 hours
Converting long timestamp to utc long timestamp.
Change Timezone from GMT to EST, the best way to accomplish?