Regards, Rene Larsen
luck, db
There are no new questions, but there may be new answers.
Dim Stef wrote:All I need to know is why Calendar.getInstance(Timezone ).getTime() ALWAYS displays my local time.
Dim Stef wrote:I would have expected that since I am supplying a timezone, the getTime() method of the Calendar class, outputs the time for that zone.
Dim Stef wrote:Like I said on my second post, I have a client/server application and I need to find a way to populate fields on the client with the server calendar details. These fields (and I am not talking about plain labels or texts), accept only Calendar objects.
Dim Stef wrote:Thank you Mike for taking the time to answer to my question.
Dim Stef wrote:I totally agree with you that Date does not have a timezone, but the way I see it, if I live in Russia and I am asking Java to give me the current date in India then Calendar.getInstance(Timezone of India).getTime() should return the current time in India.
Dim Stef wrote:Returning the local time is fundamentally incorrect. Period.
Dim Stef wrote:Playing with toString() methods just to get (and not output..) a time in a different timezone is just not right.
Dim Stef wrote:I may have to report to Oracle as an issue that require further attention.
Dim Stef wrote:Thank you very much for all your responses guys.
luck, db
There are no new questions, but there may be new answers.
Dim Stef wrote:I totally agree with you that Date does not have a timezone, but the way I see it, if I live in Russia and I am asking Java to give me the current date in India then Calendar.getInstance(Timezone of India).getTime() should return the current time in India. Returning the local time is fundamentally incorrect. Period.
I may have to report to Oracle as an issue that require further attention.
David Newton wrote:I'm not sure why we're not getting through to you on this one. You're *NOT* asking Java to give you the Date in India. You're asking Java to give you the Date of a Calendar with a TZ of India, but you're still confused as to what a Date is.
luck, db
There are no new questions, but there may be new answers.
Dm Laf wrote:Calendar is sending me a Date object, but I expect it to be modified according to the timezone.
Darryl Burke wrote:Some people never get it
http://forums.sun.com/thread.jspa?threadID=5441610
Mykola Makhin wrote:I don't understand your harshness people, you fail at explaining the issue, yet are angry at the person you're trying to explain it to.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|