Subject | Re: AW: AW: AW: [Firebird-Java] Timezones |
---|---|
Author | Roman Rokytskyy |
Post date | 2009-11-05T08:25:10Z |
> Calendar utcCalendar = new GregorianCalendar(TimeZone.getTimeZone("UTC"));Ah, did not pay attention to this difference... So using UTC is broken,
>
> java.sql.Timestamp possibleFailureLocalCorrected =
> test.decodeTimestamp(
> test.decodeTimestamp(
> test.encodeTimestamp(
> test.encodeTimestamp(tsLocal, utcCalendar))), utcCalendar);
>
> System.out.println("Date " + timeLocal.toString() + " : " +
> timeLocal.getTime() + " == " + possibleFailureLocalCorrected.getTime());
>
> Date Sun Oct 25 02:30:00 CET 2009 : 1256434200562 == 1256437800562
but the local calendar is currently ok...
Roman