Skip to content

Commit e2cac6d

Browse files
committed
Backport 8e36c05d6c80f6bdcd8a7530a382810f500885ad
1 parent 10e109d commit e2cac6d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/jdk/java/text/Format/DateFormat/DateFormatRegression.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
3030
* @bug 4029195 4052408 4056591 4059917 4060212 4061287 4065240 4071441 4073003
3131
* 4089106 4100302 4101483 4103340 4103341 4104136 4104522 4106807 4108407
3232
* 4134203 4138203 4148168 4151631 4151706 4153860 4162071 4182066 4209272 4210209
33-
* 4213086 4250359 4253490 4266432 4406615 4413980 8008577
33+
* 4213086 4250359 4253490 4266432 4406615 4413980 8008577 8305853
3434
* @library /java/text/testlib
3535
* @run main/othervm -Djava.locale.providers=COMPAT,SPI DateFormatRegression
3636
*/
@@ -357,11 +357,11 @@ public void Test4073003() {
357357
public void Test4089106() {
358358
TimeZone def = TimeZone.getDefault();
359359
try {
360-
TimeZone z = new SimpleTimeZone((int)(1.25 * 3600000), "FAKEZONE");
361-
TimeZone.setDefault(z);
360+
TimeZone customTz = TimeZone.getTimeZone("GMT-08:15");
361+
TimeZone.setDefault(customTz);
362362
SimpleDateFormat f = new SimpleDateFormat();
363-
if (!f.getTimeZone().equals(z))
364-
errln("Fail: SimpleTimeZone should use TimeZone.getDefault()");
363+
if (!f.getTimeZone().equals(customTz))
364+
errln("Fail: SimpleDateFormat should use TimeZone.getDefault()");
365365
}
366366
finally {
367367
TimeZone.setDefault(def);

0 commit comments

Comments
 (0)