I've got a fairly clean modification to PatternParser that enables specification of TimeZone for the %d pattern. In the mod (shortly to be committed if no one screams), the PatternParser looks for an unlimited number of curly braced parameters after a format specification. Every PatternConverter except DateFormat ignores all but the first. DateFormat interprets the first as the format pattern and the second as the TimeZone id. For instance, the following format would print out the time as both UTC and local.

%d{ISO8601}{GMT}Z %d{yyyy-MM-dd HH:mm:ss z} %c - %m%n

Only patterns where you intended a literal "{" to immediately follow an option would be changed by this mod. For example, before the mod that format might result in "2004-12-22 13:48:52,000{GMT}Z ....". If you wanted something like that, you could just add a space between the close } and the next {.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to