Hi everyone,

I was writing a unit test for some timezone conversions at work and I happened 
upon this error in the derived timezone offset for Greece this year.

I upgraded the timezone data files and rebuilt the joda jar so I'm just looking 
to see if anyone else experiences this same behavior (or not).

public static void main(String args[]) {
      LocalDateTime local;
      DateTime localWithTZ;

      local = new LocalDateTime("2011-10-30T02:00:00.000");
      System.out.println("Local time in Greece:           "+local);
      localWithTZ  = local.toDateTime(DateTimeZone.forID("Europe/Athens"));
      System.out.println("Local time in Greece (with TZ): "+localWithTZ);
      System.out.println();

      local = new LocalDateTime("2011-10-30T03:00:00.000");
      System.out.println("Local time in Greece:           "+local);
      localWithTZ  = local.toDateTime(DateTimeZone.forID("Europe/Athens"));
      System.out.println("Local time in Greece (with TZ): "+localWithTZ);
      System.out.println();

      local = new LocalDateTime("2011-10-30T04:00:00.000");
      System.out.println("Local time in Greece:           "+local);
      localWithTZ  = local.toDateTime(DateTimeZone.forID("Europe/Athens"));
      System.out.println("Local time in Greece (with TZ): "+localWithTZ);
      System.out.println();

      local = new LocalDateTime("2011-10-30T05:00:00.000");
      System.out.println("Local time in Greece:           "+local);
      localWithTZ  = local.toDateTime(DateTimeZone.forID("Europe/Athens"));
      System.out.println("Local time in Greece (with TZ): "+localWithTZ);
}


Output:
Local time in Greece:           2011-10-30T02:00:00.000
Local time in Greece (with TZ): 2011-10-30T02:00:00.000+03:00

**************************************************************
Local time in Greece:           2011-10-30T03:00:00.000
Local time in Greece (with TZ): 2011-10-30T03:00:00.000+02:00
**************************************************************

Local time in Greece:           2011-10-30T04:00:00.000
Local time in Greece (with TZ): 2011-10-30T04:00:00.000+02:00

Local time in Greece:           2011-10-30T05:00:00.000
Local time in Greece (with TZ): 2011-10-30T05:00:00.000+02:00


This offset is incorrect.  Greece is GMT+3 until 4AM on the 30th, at which time 
it becomes GMT+2.

Thanks,
Chris
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to