Hi All,
We are using Joda as our date-time and timezone api. We found a few interesting
things during testing and wanted to open up a discussion on the same.
1) Timezone for Australia(Australia/Sydney) does not show EDT when the
daylightsaving is ON ,it always shows only EST but the offset shown is current
during Daylightsaving.
Shown in UI for Daylight time : (EST/ UTC+11:00) {The offset is right}
Shown in UI for a date without Daylight time : (EST/ UTC+10:00)
String userSelecteddate = "10/10/2011"; (Date during day light for
Australia)
String userSelectedTime = "09:00 AM";
Pattern pat1 = Pattern.compile("(0[1-9]|1[012]|[1-9])[-
/.](0[1-9]|[12][0-9]|3[01]|[1-9])[- /.]\\d\\d\\d\\d");
Matcher mat = pat1.matcher(userSelecteddate);
if (mat.find()){
DateTimeFormatter formatter = DateTimeFormat.forPattern("MM/dd/yyyy
hh:mm a");
DateTime date =
formatter.withZone(DateTimeZone.forID("Australia/Sydney")).parseDateTime(userSelecteddate
+ " " + userSelectedTime);
DateTimeFormatter dtf1 = DateTimeFormat.forPattern("ZZ");
DateTimeFormatter dtf2 = DateTimeFormat.forPattern("z");
System.out.println( "(" + date.toString(dtf2) + "/ UTC" +
date.toString(dtf1) + ")");
2) The time zone displayed for 1:00 AM and 1:30 AM is not the same for US
and UK thought the time daylight savings ends at 2:00 AM for both, either both
should show day light time or both should show standard time for 1:00 AM and
1:30 AM.
For US:
For US on the first Sunday of Nov at 2:00 AM the day light savings ends and the
clock is changed to 1:00 AM standard time.
In the application at 1:00 AM and 1:30 AM the time zone displayed is referring
to Daylight time (CDT)
>From 2:00 AM the time zone reflects Standard time (CST)
For Brazil:
For Brazil on Sunday Feb 20th 12:00 PM the daylight savings ends and the clock
is moved back 1 hr to 11:00 PM (sat)reflect standard time that is BRT
In the application for sat 19th feb 11:00 and 11:30 PM reflect Daylight time of
BRST from 12:00 AM it shows standard time of BRT
For UK:
For UK on the last Sunday of Oct at 2:00 AM the day light savings ends and the
clock is changed to 1:00 AM standard time.
In the application for 1:00 AM and 1:30 AM the time zone shows GMT.(standard
time)
For Australia:
For Australia on Sunday April 03 at 3:00 AM the clock is turned back 1 hr to
Standard time EST.
In the Application for 2:00 AM and 2:30 AM the time zone shows EST with the
right offset.
Please let us know your thoughts.
Thanks
Sundeep
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest