I am using Java 1.4.2 and on trying to get the current time through public GregorianCalendar(TimeZone zone) I am getting a one hour time lag with respect to the system/local time. Does anyone have any idea about this?
it is possible this is related to the changing of the daylight savings clock change dates. I know there is a more technical word for that,
A couple years ago, the date when the clocks were supposed to be turned ahead in the spring was moved up, so any existing timezone rule data would still perform adjustments using the old days, making the time it returned be one hour ahead, or behind between the intervals of the old daylight savings day and the new one.
The solution is to update the timezone data files, but the official fix to the timzeone rules files for daylight savings adjustments in Java was not available to java until after Java 1.5.0 update 11 or so. do, or if it is even possible and would work.
Error: Keyboard not attached. Press F1 to continue.
Try using the the java.util.Date. That should bypass the locale settings. I assume, since you have mentioned, current time as per system time, you are not interested in DST and other locale related stuff.