]> source.dussan.org Git - aspectj.git/commitdiff
Use consistent time zones in generating time strings
authoracolyer <acolyer>
Wed, 12 Mar 2003 15:40:48 +0000 (15:40 +0000)
committeracolyer <acolyer>
Wed, 12 Mar 2003 15:40:48 +0000 (15:40 +0000)
bridge/testsrc/org/aspectj/bridge/VersionTest.java

index 2dcc1d0560b49706d49294c3d4903204d2b6a2ef..079a6db2f2e1ca6d47f5e24c0e503d169538190f 100644 (file)
@@ -15,6 +15,8 @@ package org.aspectj.bridge;
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.Locale;
+import java.util.TimeZone;
 
 import junit.framework.TestCase;
 import junit.textui.TestRunner;
@@ -45,7 +47,8 @@ public class VersionTest extends TestCase {
             assertEquals(Version.time, Version.NOTIME);
         } else {
             Date date = new Date(Version.time);
-            SimpleDateFormat format = new SimpleDateFormat(Version.SIMPLE_DATE_FORMAT);
+            SimpleDateFormat format = new SimpleDateFormat(Version.SIMPLE_DATE_FORMAT, Locale.US);
+            format.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));
             String timeString = format.format(date);
             assertEquals(Version.time_text, timeString);
         }