APAR status
Closed as program error.
Error description
Environment: Windows Product name: IBM? Rational? Business Developer Program Version : 7.1.0.2 Description Generated Java code produces incorrect output when referring to timezones in timestamps. Create Java method that creates a Calendar with a specific timez one eg: public static void getCalendar(test recordTest) throws JavartExc eption { Calendar cal = Calendar.getInstance(TimeZone.getTimeZone('GMT')) ; recordTest.sett1(cal); System.out.println('Java Original Calendar timezone: '+cal.getTi meZone()); System.out.println('Java Original Calendar hour: '+cal.get(Calen dar.HOUR)); System.out.println('Java Record Calendar timezone: '+recordTest.gett1().getTimeZone()); System.out.println('Java Record Calendar hour: '+recordTest.gett1().get(Calendar.HOUR)); } Call this method from EGL eg: record test t1 timestamp; t2 timestamp; end program TestTime type BasicProgram {} function main() rec test; JavaLib.invoke('com.costaisa.TestTimeJava', 'getCalendar', rec a s Any); SysLib.writestdout('Calendar from java '+rec.t1); SysLib.writestdout('Calendar from egl '+rec.t2); SysLib.writestdout('Difference '+(rec.t2-rec.t1)); end end The result is: Java Original Calendar timezone: sun.util.calendar.ZoneInfo[id=' GMT',offset=0,dstSavings=0,useDaylight=false,transitions=0,lastR ule=null] Java Original Calendar hour: 5 Java Record Calendar timezone: sun.util.calendar.ZoneInfo[id='Eu rope/Paris',offset=3600000,dstSavings=3600000,useDaylight=true,t ransitions=184,lastRule=java.util.SimpleTim eZone[id=Europe/Paris,offset=3600000,dstSavings=3600000,useDayli ght=true,startYear=0,startMod e=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000, startTimeMode=2,endMode=2, endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode= 2]] Java Record Calendar hour: 5 Calendar from java 2009-02-10 17:37:32 Calendar from egl 2009-02-10 18:37:32 Difference 0 01:00:00.000000 Assigning the calendar with a different timezone to the EGL reco rd does not preserve the timezone but only maintains the hour.
Local fix
Problem summary
When a java.util.Calendar object was assigned to an EGL timestamp field, the timezone of the Calendar was not taken into account. The hour value of the Calendar was assumed to be in the local timezone. This would result in an incorrect value in the EGL timestamp.
Problem conclusion
The problem has been fixed.
Temporary fix
Comments
APAR Information
APAR number
PK80872
Reported component name
RATL BUS DEV
Reported component ID
5724S5000
Reported release
751
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-02-18
Closed date
2009-03-20
Last modified date
2009-03-20
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
RATL BUS DEV
Fixed component ID
5724S5000
Applicable component levels
R751 PSN
UP
[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMQ79","label":"Rational Business Developer"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5.1","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]
Document Information
Modified date:
20 March 2009