From 37c3bdb05f5795d8a772d12da8a0af9e8e359bc6 Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 12 Mar 2003 15:40:48 +0000 Subject: Use consistent time zones in generating time strings --- bridge/testsrc/org/aspectj/bridge/VersionTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bridge') diff --git a/bridge/testsrc/org/aspectj/bridge/VersionTest.java b/bridge/testsrc/org/aspectj/bridge/VersionTest.java index 2dcc1d056..079a6db2f 100644 --- a/bridge/testsrc/org/aspectj/bridge/VersionTest.java +++ b/bridge/testsrc/org/aspectj/bridge/VersionTest.java @@ -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); } -- cgit v1.2.3