carnold 2004/12/27 00:09:50
Modified: tests/src/java/org/apache/log4j/pattern
CachedDateFormatTest.java
Log:
More caching tweaks, removed RelativeTimeDateFormat
Revision Changes Path
1.11 +3 -1
logging-log4j/tests/src/java/org/apache/log4j/pattern/CachedDateFormatTest.java
Index: CachedDateFormatTest.java
===================================================================
RCS file:
/home/cvs/logging-log4j/tests/src/java/org/apache/log4j/pattern/CachedDateFormatTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- CachedDateFormatTest.java 24 Dec 2004 09:13:50 -0000 1.10
+++ CachedDateFormatTest.java 27 Dec 2004 08:09:50 -0000 1.11
@@ -214,9 +214,11 @@
*/
public void test8() {
DateFormat baseFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
+ baseFormat.setTimeZone(GMT);
DateFormat cachedFormat = new CachedDateFormat(baseFormat, 1000);
- cachedFormat.setTimeZone(TimeZone.getTimeZone("GMT-6"));
Date jul4 = new Date(12603L * 86400000L);
+ assertEquals("2004-07-04 00:00:00,000", cachedFormat.format(jul4));
+ cachedFormat.setTimeZone(TimeZone.getTimeZone("GMT-6"));
assertEquals("2004-07-03 18:00:00,000", cachedFormat.format(jul4));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]