-
Type:
Bug
-
Resolution: Timed out
-
Priority:
Medium
-
None
-
Affects Version/s: 4.1, 4.1.1, 4.1.2, 4.2
-
Component/s: None
-
4.01
-
Severity 2 - Major
-
JIRA uses Joda Time for time tracking and Joda Time ships with embedded timezone information. When governments change their minds and alter Daylight savings times this data is rendered obsolete causing JIRA to display times incorrectly and JIRA has no way of updating this information. This has recently occurred in Argentina which abolished daylight saving time in 2009.
Oracle publish regular timezone data updates to correct this for the core Java packages, but Joda Time does not make use of these.
Try this quick test with Joda Time 1.6 as shiooed with JIRA 4.2
public void testArgentina()
{
{
TimeZone tz = TimeZone.getTimeZone("GMT-03:00");
assertFalse("Daylight", tz.inDaylightTime(new GregorianCalendar(2010, 10, 1).getTime()));
DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
format.setTimeZone(tz);
System.out.println(format.format(new Date()));
DateTimeZone jtz = DateTimeZone.forTimeZone(tz);
DateTimeFormatter jformat = DateTimeFormat.forStyle("SS").withZone(jtz);
jformat.print(new org.joda.time.DateTime());
System.out.println(jformat.print(new org.joda.time.DateTime()));
}
{
TimeZone tz = TimeZone.getTimeZone("America/Argentina/Buenos_Aires");
assertFalse("Daylight", tz.inDaylightTime(new GregorianCalendar(2010, 10, 1).getTime()));
DateFormat format = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
format.setTimeZone(tz);
System.out.println(format.format(new Date()));
DateTimeZone jtz = DateTimeZone.forTimeZone(tz);
DateTimeFormatter jformat = DateTimeFormat.forStyle("SS").withZone(jtz);
System.out.println(jformat.print(new org.joda.time.DateTime()));
}
}