09-22-2009, 02:50 PM
Join Date: Mar 2008
Location: Austin, TX
Post Thanks: 0
Thanked 34 Times in 33 Posts
I understand your argument, but that is not the way this works.
Here is the deal:
* All dates are stored as the GMT value, not a time-zone adjusted value.
* The date (once retrieved) is displayed or viewed as the local adjusted value for the time zone, or the default device time zone.
* The "getCurrentMillis()" methods are going to return you the "raw" GMT time, because the other API's will adjust your *view* of this data to the local zone.
In your Calendar example above, try getting and printing out the various discrete date components (DAY, MONTH, etc). I think you will find that these will come back to you adjusted for the timezone you requested in the getInstance() method.
Perhaps if you can explain what you are trying to accomplish, we can make a suggestion on how to get there.