mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8262110: DST starts from incorrect time in 2038
8073446: TimeZone getOffset API does not return a dst offset between years 2038-2137 Reviewed-by: rriggs
This commit is contained in:
parent
3a28dc8213
commit
7284f013ea
2 changed files with 75 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -285,7 +285,7 @@ public class ZoneInfo extends TimeZone {
|
|||
int dstoffset = tz.getOffset(msec) - rawOffset;
|
||||
|
||||
// Check if it's in a standard-to-daylight transition.
|
||||
if (dstoffset > 0 && tz.getOffset(msec - dstoffset) == rawoffset) {
|
||||
if (dstoffset > 0 && tz.getOffset(msec - dstoffset) == rawoffset && type == WALL_TIME) {
|
||||
dstoffset = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue