[Simpleweb-Support] DateParser not adjusting for time zone differences?
Brought to you by:
niallg
From: petite_abeille <pet...@ma...> - 2004-06-22 20:22:21
|
Hello, It would appear that DateParser doesn't take the local time zone into account when generating its string representation: new DateParser( System.currentTimeMillis() ).toString(); Tue, 22 Jun 2004 22:18:55 GMT Generates the correct time, but in my local time zone instead of GMT :/ Compare this with SimpleDateFormat: SimpleDateFormat aFormat = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss 'GMT'" ); aFormat.setTimeZone( TimeZone.getTimeZone( "GMT" ) ); aFormat.format( new Date( System.currentTimeMillis() ) ); Tue, 22 Jun 2004 20:18:55 GMT What gives? Cheers, PA. |