src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 50817 fa1e04811ff6
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   607                 params[8] = endRule.secondOfDay * 1000;
   607                 params[8] = endRule.secondOfDay * 1000;
   608                 params[9] = toSTZTime[endRule.timeDefinition];
   608                 params[9] = toSTZTime[endRule.timeDefinition];
   609                 dstSavings = (startRule.offsetAfter - startRule.offsetBefore) * 1000;
   609                 dstSavings = (startRule.offsetAfter - startRule.offsetBefore) * 1000;
   610 
   610 
   611                 // Note: known mismatching -> Asia/Amman
   611                 // Note: known mismatching -> Asia/Amman
   612                 //                            Asia/Gaza
       
   613                 //                            Asia/Hebron
       
   614                 // ZoneInfo :      startDayOfWeek=5     <= Thursday
   612                 // ZoneInfo :      startDayOfWeek=5     <= Thursday
   615                 //                 startTime=86400000   <= 24 hours
   613                 //                 startTime=86400000   <= 24 hours
   616                 // This:           startDayOfWeek=6
   614                 // This:           startDayOfWeek=6
   617                 //                 startTime=0
   615                 //                 startTime=0
   618                 // Similar workaround needs to be applied to Africa/Cairo and
   616                 // Similar workaround needs to be applied to Africa/Cairo and
   619                 // its endDayOfWeek and endTime
   617                 // its endDayOfWeek and endTime
   620                 // Below is the workarounds, it probably slows down everyone a little
   618                 // Below is the workarounds, it probably slows down everyone a little
   621                 if (params[2] == 6 && params[3] == 0 &&
   619                 if (params[2] == 6 && params[3] == 0 &&
   622                     (zoneId.equals("Asia/Amman") ||
   620                     (zoneId.equals("Asia/Amman"))) {
   623                      zoneId.equals("Asia/Gaza") ||
       
   624                      zoneId.equals("Asia/Hebron"))) {
       
   625                     params[2] = 5;
   621                     params[2] = 5;
   626                     params[3] = 86400000;
   622                     params[3] = 86400000;
   627                 }
   623                 }
   628                 // Additional check for startDayOfWeek=6 and starTime=86400000
   624                 // Additional check for startDayOfWeek=6 and starTime=86400000
   629                 // is needed for Asia/Amman; Asia/Gasa and Asia/Hebron
   625                 // is needed for Asia/Amman;
   630                 if (params[2] == 7 && params[3] == 0 &&
   626                 if (params[2] == 7 && params[3] == 0 &&
   631                      (zoneId.equals("Asia/Amman") ||
   627                      (zoneId.equals("Asia/Amman"))) {
   632                       zoneId.equals("Asia/Gaza") ||
       
   633                       zoneId.equals("Asia/Hebron"))) {
       
   634                     params[2] = 6;        // Friday
   628                     params[2] = 6;        // Friday
   635                     params[3] = 86400000; // 24h
   629                     params[3] = 86400000; // 24h
   636                 }
   630                 }
   637                 //endDayOfWeek and endTime workaround
   631                 //endDayOfWeek and endTime workaround
   638                 if (params[7] == 6 && params[8] == 0 &&
   632                 if (params[7] == 6 && params[8] == 0 &&