The local time 2011-10-30T03:00:00.000 occurs twice on that date
first at:
2011-10-30T03:00:00.000+02:00
then one hour later at:
2011-10-30T03:00:00.000+03:00

(in Autumn DST causes one hour to be repeated)

See http://www.timeanddate.com/worldclock/city.html?n=26 for some more info.

The version of Joda-Time you are using chooses the later time. The
version in svn chooses the earlier time.

Stephen


On 4 May 2011 19:04, Cook, Christopher J. <[email protected]> wrote:
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/joda-interest
>
>

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to