From: Riemer, R. \(GE Healthcare\) <Ric...@me...> - 2005-03-25 14:59:29
|
Hi, I'm a software engineer with GE Healthcare IT, and am currently using = HAPI 0.4.3 for an application we're developing. I stumbled onto an issue with representing timezones in TM datatypes, = for which I'd like to get some feedback. I'm using the TM.toHl7TMFormat() method as follows: java.util.Date date =3D new = SimpleDateFormat("yyyyMMddHHmmssZ").parse("19740805000000+0000"); GregorianCalender cal =3D new GregorianCalender(); cal.setTime(date); return DT.toHl7DTFormat(cal) + TM.toHl7TMFormat(cal); If I run this piece of code in different timezones, different values are = returned: * When run in CET 25-March-2005 (Central European Time, UTC+1): = 19740805010000+0100 This seems to be OK. It is the same time, displayed in the local = timezone * When run in CEST 25-April-2005 (Central European Summer Time, UTC+2): = 19740805010000+0100 Still OK, but the time is displayed as winter time, instead of in = daylight saving time * When run in CST (Central Standard Time, UTC-6): 19740804190000-0600 This seems to be wrong. The timezone -0600 is OK, but the time should be = 180000-0600 here, instead of 190000-0600. * When run in CDT (Central Daylight Time, UTC-5): 19740804190000-0600 This seems to be wrong as well. The time should be either 19000000-0500 = or 180000-0600. Am I correct in my assumptions that: * the time is incorrect for some timezones (CST and CDT)? * the timezone should reflect the daylight saving time, so in CST we = should se 020000+0200 instead of 010000+0100? Any help would be appreciated. I'd like to know if I should submit bugs = for any or both of my assumptions. Thanks, Rick Riemer Software Engineer Core Infrastructure Platforms GE Healthcare IT T +31 30 692 6000 F +31 30 692 6010 D *381 6427 E ric...@me... www.gehealthcare.com |