User error...the wrong version of the file was included in the previous email. Here is the correct version.
sorry, -Mark > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Saturday, June 15, 2002 10:56 PM > To: Log4J Developers List > Subject: [SUBMIT] Timezone support for date elements of pattern layout > > > This code was submitted to me directly by someone that wished to remain > anonymous and didn't want to handle the submission process themselves. I > told them I would shepard this change through review and checkin, if > accepted. This was some time ago, and I just got a chance to review the > changes and apply them to the current version of the code. > > It is a change to set a specific time zone for date output within a log > message. I think it is a rather clever modification, it is something that > has been asked for often on the user list, and I don't think it has been > addressed yet (has it?). But not having deep experience with this portion > of the code, I am submitting it for deeper review by those that know. > > The modification is a rather simple one to > o.a.log4j.helpers.PatternParser.java. Look at the case statement for the > 'd' element. Instead of definitions like this: > > %d{ABSOLUTE} > > the changes allow optional timezone information to be included like this: > > %d{ABSOLUTE@UMT} > > The portion of the string to the right of the '@' character should be a > string appropriate to be used by the java.util.TimeZone class. > The portion > to the string to the left of the '@' character can be just as it is today. > > The added code to parse the timezone string and set the timezone on the > DateFormat object is complementary to the existing code, and seems very > straight forward to me. I don't know if there are other > implications that I > am unaware of. Thus this message and review. > > If this change looks good, and we want it, I can check in the > change. I am > assuming it would go into version 1.3, not the next version of 1.2, though > it is not a breaking change. > > -Mark >
PatternParser.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
