aspose file tools*
The moose likes Servlets and the fly likes Strange behavior, with timezone maybe? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Strange behavior, with timezone maybe?" Watch "Strange behavior, with timezone maybe?" New topic
Author

Strange behavior, with timezone maybe?

Ibelio Villalba
Greenhorn

Joined: Sep 14, 2009
Posts: 3
How can the same code produce different output?, i don't get it.

I have the following code in a servlet:


=====Ouput:=====================================================
[10/21/09 9:07:14:349 PYST] 0000004c SystemOut O date: Wed Oct 21 08:07:14 PYT 2009
[10/21/09 9:07:14:357 PYST] 0000004c SystemOut O timezone: sun.util.calendar.ZoneInfo[id="America/Asuncion",offset=-14400000,dstSavings=3600000,useDaylight=true,transitions=129,lastRule=java.util.SimpleTimeZone[id=America/Asuncion,offset=-14400000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=15,startDayOfWeek=1,startTime=0,startTimeMode=0,endMode=3,endMonth=2,endDay=8,endDayOfWeek=1,endTime=0,endTimeMode=0]]
[10/21/09 9:07:14:357 PYST] 0000004c SystemOut O date: Wed Oct 21 09:07:14 PYST 2009
[10/21/09 9:07:14:365 PYST] 0000004c SystemOut O timezone: sun.util.calendar.ZoneInfo[id="America/Asuncion",offset=-14400000,dstSavings=3600000,useDaylight=true,transitions=129,lastRule=java.util.SimpleTimeZone[id=America/Asuncion,offset=-14400000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=9,startDay=15,startDayOfWeek=1,startTime=0,startTimeMode=0,endMode=3,endMonth=2,endDay=8,endDayOfWeek=1,endTime=0,endTimeMode=0]]
=====================================================================

Environment:
WebSphere Application Server: 6.1.0.27
java -version output: "1.4.2"gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-44)Copyright (C) 2006 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

Can somebody shed some light on the subject?. Thanks in advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strange behavior, with timezone maybe?
 
Similar Threads
rendering calendar object
Timezone Issues
Calendar.getTime() not properly reporting DST?
Daylight Saving Time in Java5
Output a Calendar with timezone, in W3C datetime format?