|
1 | 1 | /* |
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. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
30 | 30 | * @bug 4029195 4052408 4056591 4059917 4060212 4061287 4065240 4071441 4073003 |
31 | 31 | * 4089106 4100302 4101483 4103340 4103341 4104136 4104522 4106807 4108407 |
32 | 32 | * 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 |
34 | 34 | * @library /java/text/testlib |
35 | 35 | * @run main/othervm -Djava.locale.providers=COMPAT,SPI DateFormatRegression |
36 | 36 | */ |
@@ -357,11 +357,11 @@ public void Test4073003() { |
357 | 357 | public void Test4089106() { |
358 | 358 | TimeZone def = TimeZone.getDefault(); |
359 | 359 | 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); |
362 | 362 | 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()"); |
365 | 365 | } |
366 | 366 | finally { |
367 | 367 | TimeZone.setDefault(def); |
|
0 commit comments