On Feb 7, 2007, at 4:55 PM, Eric Kolotyluk wrote:
I'm now confused by the different patterns "{GMT+0}" vs "'GMT'Z" -
which
one is correct?
ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss.SSS 'GMT'Z} %c [%t] -
ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss.SSS}{GMT}Z %c [%t] -
Both are legal, but do different things. The first is equivalent to:
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss.SSS 'GMT'Z");
which results in the year, month, ..., microseconds, then the literal
'GMT' and then the offset of the current time zone from GMT.
The second is equivalent to:
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss.SSS");
format.setTimeZone(TimeZone.getTimeZone("GMT");
When results in the year, month, ..., microseconds of the date using
the GMT timezone.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]