Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
a495795c
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a495795c
编写于
10月 17, 2019
作者:
A
andrew
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
dbffd531
17b457e6
变更
108
显示空白变更内容
内联
并排
Showing
108 changed file
with
3388 addition
and
767 deletion
+3388
-767
.hgtags
.hgtags
+5
-0
THIRD_PARTY_README
THIRD_PARTY_README
+5
-10
make/data/tzdata/VERSION
make/data/tzdata/VERSION
+1
-1
make/data/tzdata/africa
make/data/tzdata/africa
+141
-29
make/data/tzdata/antarctica
make/data/tzdata/antarctica
+7
-7
make/data/tzdata/asia
make/data/tzdata/asia
+131
-108
make/data/tzdata/australasia
make/data/tzdata/australasia
+111
-43
make/data/tzdata/europe
make/data/tzdata/europe
+193
-103
make/data/tzdata/factory
make/data/tzdata/factory
+1
-1
make/data/tzdata/leapseconds
make/data/tzdata/leapseconds
+22
-19
make/data/tzdata/northamerica
make/data/tzdata/northamerica
+187
-104
make/data/tzdata/pacificnew
make/data/tzdata/pacificnew
+1
-1
make/data/tzdata/southamerica
make/data/tzdata/southamerica
+38
-39
make/data/tzdata/systemv
make/data/tzdata/systemv
+1
-1
make/data/tzdata/zone.tab
make/data/tzdata/zone.tab
+4
-1
make/lib/NetworkingLibraries.gmk
make/lib/NetworkingLibraries.gmk
+1
-1
src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java
...classes/com/sun/security/auth/module/Krb5LoginModule.java
+10
-2
src/share/classes/java/awt/Font.java
src/share/classes/java/awt/Font.java
+5
-1
src/share/classes/java/io/FilePermission.java
src/share/classes/java/io/FilePermission.java
+37
-0
src/share/classes/java/net/NetPermission.java
src/share/classes/java/net/NetPermission.java
+10
-1
src/share/classes/java/net/ServerSocket.java
src/share/classes/java/net/ServerSocket.java
+15
-0
src/share/classes/java/net/Socket.java
src/share/classes/java/net/Socket.java
+18
-0
src/share/classes/java/net/URL.java
src/share/classes/java/net/URL.java
+10
-0
src/share/classes/java/util/regex/Pattern.java
src/share/classes/java/util/regex/Pattern.java
+13
-1
src/share/classes/javax/security/auth/kerberos/JavaxSecurityAuthKerberosAccessImpl.java
...ty/auth/kerberos/JavaxSecurityAuthKerberosAccessImpl.java
+7
-3
src/share/classes/javax/security/auth/kerberos/KerberosTicket.java
.../classes/javax/security/auth/kerberos/KerberosTicket.java
+18
-2
src/share/classes/sun/font/CMap.java
src/share/classes/sun/font/CMap.java
+17
-5
src/share/classes/sun/font/FileFont.java
src/share/classes/sun/font/FileFont.java
+1
-1
src/share/classes/sun/font/FontScaler.java
src/share/classes/sun/font/FontScaler.java
+6
-0
src/share/classes/sun/font/FreetypeFontScaler.java
src/share/classes/sun/font/FreetypeFontScaler.java
+21
-3
src/share/classes/sun/font/GlyphList.java
src/share/classes/sun/font/GlyphList.java
+14
-0
src/share/classes/sun/java2d/SunGraphics2D.java
src/share/classes/sun/java2d/SunGraphics2D.java
+4
-2
src/share/classes/sun/misc/Launcher.java
src/share/classes/sun/misc/Launcher.java
+3
-0
src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
.../classes/sun/net/www/protocol/http/HttpURLConnection.java
+4
-0
src/share/classes/sun/net/www/protocol/jar/Handler.java
src/share/classes/sun/net/www/protocol/jar/Handler.java
+14
-1
src/share/classes/sun/rmi/registry/RegistryImpl_Skel.java
src/share/classes/sun/rmi/registry/RegistryImpl_Skel.java
+10
-10
src/share/classes/sun/rmi/registry/RegistryImpl_Stub.java
src/share/classes/sun/rmi/registry/RegistryImpl_Stub.java
+15
-12
src/share/classes/sun/rmi/transport/DGCImpl_Skel.java
src/share/classes/sun/rmi/transport/DGCImpl_Skel.java
+9
-8
src/share/classes/sun/rmi/transport/DGCImpl_Stub.java
src/share/classes/sun/rmi/transport/DGCImpl_Stub.java
+29
-21
src/share/classes/sun/rmi/transport/StreamRemoteCall.java
src/share/classes/sun/rmi/transport/StreamRemoteCall.java
+21
-1
src/share/classes/sun/security/jgss/krb5/Krb5Context.java
src/share/classes/sun/security/jgss/krb5/Krb5Context.java
+5
-3
src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java
...re/classes/sun/security/jgss/krb5/Krb5InitCredential.java
+8
-4
src/share/classes/sun/security/jgss/krb5/Krb5MechFactory.java
...share/classes/sun/security/jgss/krb5/Krb5MechFactory.java
+3
-1
src/share/classes/sun/security/jgss/krb5/Krb5NameElement.java
...share/classes/sun/security/jgss/krb5/Krb5NameElement.java
+2
-2
src/share/classes/sun/security/jgss/krb5/Krb5ProxyCredential.java
...e/classes/sun/security/jgss/krb5/Krb5ProxyCredential.java
+29
-2
src/share/classes/sun/security/jgss/krb5/Krb5Util.java
src/share/classes/sun/security/jgss/krb5/Krb5Util.java
+23
-6
src/share/classes/sun/security/krb5/Credentials.java
src/share/classes/sun/security/krb5/Credentials.java
+20
-16
src/share/classes/sun/security/krb5/JavaxSecurityAuthKerberosAccess.java
...es/sun/security/krb5/JavaxSecurityAuthKerberosAccess.java
+12
-3
src/share/classes/sun/security/krb5/Realm.java
src/share/classes/sun/security/krb5/Realm.java
+0
-1
src/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java
.../sun/security/krb5/internal/ccache/CCacheInputStream.java
+20
-12
src/share/classes/sun/security/krb5/internal/ccache/CCacheOutputStream.java
...sun/security/krb5/internal/ccache/CCacheOutputStream.java
+15
-1
src/share/classes/sun/security/krb5/internal/ccache/Credentials.java
...lasses/sun/security/krb5/internal/ccache/Credentials.java
+20
-0
src/share/classes/sun/security/krb5/internal/ccache/CredentialsCache.java
...s/sun/security/krb5/internal/ccache/CredentialsCache.java
+58
-7
src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java
...n/security/krb5/internal/ccache/FileCredentialsCache.java
+102
-3
src/share/classes/sun/security/ssl/EllipticCurvesExtension.java
...are/classes/sun/security/ssl/EllipticCurvesExtension.java
+5
-14
src/share/classes/sun/security/util/SecurityConstants.java
src/share/classes/sun/security/util/SecurityConstants.java
+5
-1
src/share/classes/sun/security/util/SecurityProperties.java
src/share/classes/sun/security/util/SecurityProperties.java
+82
-0
src/share/classes/sun/util/calendar/ZoneInfoFile.java
src/share/classes/sun/util/calendar/ZoneInfoFile.java
+5
-15
src/share/lib/security/java.security-aix
src/share/lib/security/java.security-aix
+29
-0
src/share/lib/security/java.security-linux
src/share/lib/security/java.security-linux
+29
-0
src/share/lib/security/java.security-macosx
src/share/lib/security/java.security-macosx
+29
-0
src/share/lib/security/java.security-solaris
src/share/lib/security/java.security-solaris
+29
-0
src/share/lib/security/java.security-windows
src/share/lib/security/java.security-windows
+29
-0
src/share/native/sun/font/DrawGlyphList.c
src/share/native/sun/font/DrawGlyphList.c
+18
-0
src/share/native/sun/font/freetypeScaler.c
src/share/native/sun/font/freetypeScaler.c
+77
-10
src/share/native/sun/font/layout/AlternateSubstSubtables.cpp
src/share/native/sun/font/layout/AlternateSubstSubtables.cpp
+4
-0
src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp
...are/native/sun/font/layout/CursiveAttachmentSubtables.cpp
+4
-0
src/share/native/sun/font/layout/LigatureSubstSubtables.cpp
src/share/native/sun/font/layout/LigatureSubstSubtables.cpp
+4
-0
src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp
src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp
+4
-0
src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp
...re/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp
+4
-0
src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp
src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp
+4
-0
src/share/native/sun/font/layout/MorphTables.cpp
src/share/native/sun/font/layout/MorphTables.cpp
+4
-2
src/share/native/sun/font/layout/PairPositioningSubtables.cpp
...share/native/sun/font/layout/PairPositioningSubtables.cpp
+12
-0
src/share/native/sun/font/layout/SegmentArrayProcessor.cpp
src/share/native/sun/font/layout/SegmentArrayProcessor.cpp
+2
-0
src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp
src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp
+2
-0
src/share/native/sun/font/layout/SegmentSingleProcessor.cpp
src/share/native/sun/font/layout/SegmentSingleProcessor.cpp
+2
-0
src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp
src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp
+2
-0
src/share/native/sun/font/layout/SimpleArrayProcessor.cpp
src/share/native/sun/font/layout/SimpleArrayProcessor.cpp
+2
-0
src/share/native/sun/font/layout/SinglePositioningSubtables.cpp
...are/native/sun/font/layout/SinglePositioningSubtables.cpp
+12
-0
src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp
...re/native/sun/font/layout/SingleSubstitutionSubtables.cpp
+12
-0
src/share/native/sun/font/layout/SingleTableProcessor.cpp
src/share/native/sun/font/layout/SingleTableProcessor.cpp
+2
-0
src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h
src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h
+2
-0
src/share/native/sun/java2d/loops/LoopMacros.h
src/share/native/sun/java2d/loops/LoopMacros.h
+4
-4
src/share/native/sun/java2d/opengl/OGLBlitLoops.c
src/share/native/sun/java2d/opengl/OGLBlitLoops.c
+18
-24
src/share/native/sun/security/krb5/nativeccache.c
src/share/native/sun/security/krb5/nativeccache.c
+44
-0
src/solaris/classes/sun/font/XRGlyphCache.java
src/solaris/classes/sun/font/XRGlyphCache.java
+3
-0
src/solaris/classes/sun/font/XRTextRenderer.java
src/solaris/classes/sun/font/XRTextRenderer.java
+3
-0
src/solaris/classes/sun/nio/fs/BsdFileStore.java
src/solaris/classes/sun/nio/fs/BsdFileStore.java
+6
-14
src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java
src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java
+15
-1
src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java
src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java
+1
-1
src/solaris/native/sun/java2d/x11/X11FontScaler_md.c
src/solaris/native/sun/java2d/x11/X11FontScaler_md.c
+5
-1
src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c
src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c
+22
-1
src/solaris/native/sun/security/smartcardio/MUSCLE/COPYING
src/solaris/native/sun/security/smartcardio/MUSCLE/COPYING
+95
-0
src/windows/classes/java/lang/ProcessImpl.java
src/windows/classes/java/lang/ProcessImpl.java
+106
-48
src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
...es/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
+12
-2
src/windows/classes/sun/security/krb5/internal/tools/Klist.java
...ndows/classes/sun/security/krb5/internal/tools/Klist.java
+35
-3
src/windows/native/sun/java2d/d3d/D3DContext.cpp
src/windows/native/sun/java2d/d3d/D3DContext.cpp
+3
-1
src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthentication.c
...ative/sun/net/www/protocol/http/ntlm/NTLMAuthentication.c
+29
-3
test/java/awt/FontClass/FontSize1Test.java
test/java/awt/FontClass/FontSize1Test.java
+56
-0
test/java/awt/image/DrawImage/IncorrectManagedImageSourceOffset.java
...wt/image/DrawImage/IncorrectManagedImageSourceOffset.java
+188
-0
test/java/awt/image/DrawImage/IncorrectUnmanagedImageSourceOffset.java
.../image/DrawImage/IncorrectUnmanagedImageSourceOffset.java
+54
-11
test/java/awt/image/DrawImage/SimpleManagedImage.java
test/java/awt/image/DrawImage/SimpleManagedImage.java
+196
-0
test/java/awt/image/DrawImage/SimpleUnmanagedImage.java
test/java/awt/image/DrawImage/SimpleUnmanagedImage.java
+201
-0
test/java/io/FilePermission/Invalid.java
test/java/io/FilePermission/Invalid.java
+67
-0
test/java/rmi/testlibrary/TestSocketFactory.java
test/java/rmi/testlibrary/TestSocketFactory.java
+16
-4
test/java/util/TimeZone/TimeZoneTest.java
test/java/util/TimeZone/TimeZoneTest.java
+3
-4
test/lib/testlibrary/jdk/testlibrary/net/URIBuilder.java
test/lib/testlibrary/jdk/testlibrary/net/URIBuilder.java
+111
-0
test/sun/net/www/protocol/http/TestTransparentNTLM.java
test/sun/net/www/protocol/http/TestTransparentNTLM.java
+203
-0
未找到文件。
.hgtags
浏览文件 @
a495795c
...
...
@@ -1006,3 +1006,8 @@ c7a97c9b7e5932d651eda37c8a907311818491d7 jdk8u222-b07
3ef3348195ffeb3c268af4a43928f2f09c5fa83a jdk8u232-b04
6d60b8cf1bd4a5fa371b1ddad9d186ff546b25f5 jdk8u232-b05
1e8cdf311133ecde0ccae37e6137e49adc6164fb jdk8u242-b00
5d57817931e1f5b6a460158342f132ea348e14ef jdk8u232-b06
3560e0ebe876ce658c5261070fe728e47994210f jdk8u232-b07
69c4f673b33e255599d2aa257fa50fd8b48b7b95 jdk8u232-b08
5456f24496f43f72b0cf4f0db3a73ea49c33f94f jdk8u232-b09
5456f24496f43f72b0cf4f0db3a73ea49c33f94f jdk8u232-ga
THIRD_PARTY_README
浏览文件 @
a495795c
...
...
@@ -2130,13 +2130,13 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
-------------------------------------------------------------------------------
%% This notice is provided with respect to PC/SC Lite
for Suse Linux v.1.1.1
,
%% This notice is provided with respect to PC/SC Lite
v1.8.24
,
which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
--- begin of LICENSE ---
Copyright (c) 1999-200
4
David Corcoran <corcoran@linuxnet.com>
Copyright (c)
1999-2004 Ludovic Rousseau <ludovic.rousseau (at)
free.fr>
Copyright (c) 1999-200
3
David Corcoran <corcoran@linuxnet.com>
Copyright (c)
2001-2011 Ludovic Rousseau <ludovic.rousseau@
free.fr>
All rights reserved.
Redistribution and use in source and binary forms, with or without
...
...
@@ -2148,12 +2148,7 @@ are met:
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by:
David Corcoran <corcoran@linuxnet.com>
http://www.linuxnet.com (MUSCLE)
4. The name of the author may not be used to endorse or promote products
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
Changes to this license can be made only by the copyright author with
...
...
make/data/tzdata/VERSION
浏览文件 @
a495795c
...
...
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2019
a
tzdata2019
c
make/data/tzdata/africa
浏览文件 @
a495795c
...
...
@@ -112,7 +112,7 @@ Rule Algeria 1980 only - Apr 25 0:00 1:00 S
Rule Algeria 1980 only - Oct 31 2:00 0 -
# Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
# more precise 0:09:21.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01
0:09:21 - PMT 1911 Mar 11 # Paris Mean Time
0:00 Algeria WE%sT 1940 Feb 25 2:00
...
...
@@ -147,7 +147,7 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01
# For now, ignore that and follow the 1911-05-26 Portuguese decree
# (see Europe/Lisbon).
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia
-2:00 - -02 1942 Sep
-2:00 1:00 -01 1945 Oct 15
...
...
@@ -158,7 +158,7 @@ Zone Atlantic/Cape_Verde -1:34:04 - LMT 1912 Jan 01 2:00u # Praia
# See Africa/Lagos.
# Chad
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena
1:00 - WAT 1979 Oct 14
1:00 1:00 WAST 1980 Mar 8
...
...
@@ -174,7 +174,7 @@ Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena
# See Africa/Lagos.
# Côte d'Ivoire / Ivory Coast
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Abidjan -0:16:08 - LMT 1912
0:00 - GMT
Link Africa/Abidjan Africa/Bamako # Mali
...
...
@@ -379,7 +379,7 @@ Rule Egypt 2014 only - Jun 26 24:00 0 -
Rule Egypt 2014 only - Jul 31 24:00 1:00 S
Rule Egypt 2014 only - Sep lastThu 24:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Cairo 2:05:09 - LMT 1900 Oct
2:00 Egypt EE%sT
...
...
@@ -437,7 +437,7 @@ Zone Africa/Cairo 2:05:09 - LMT 1900 Oct
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Ghana 1920 1942 - Sep 1 0:00 0:20 -
Rule Ghana 1920 1942 - Dec 31 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Accra -0:00:52 - LMT 1918
0:00 Ghana GMT/+0020
...
...
@@ -451,13 +451,13 @@ Zone Africa/Accra -0:00:52 - LMT 1918
# evidently confusing the date of the Portuguese decree
# (see Europe/Lisbon) with the date that it took effect.
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 1:00u
-1:00 - -01 1975
0:00 - GMT
# Kenya
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul
3:00 - EAT 1930
2:30 - +0230 1940
...
...
@@ -492,7 +492,7 @@ Link Africa/Nairobi Indian/Mayotte
# Use the abbreviation "MMT" before 1972, as the more-accurate numeric
# abbreviation "-004430" would be one byte over the POSIX limit.
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Monrovia -0:43:08 - LMT 1882
-0:43:08 - MMT 1919 Mar # Monrovia Mean Time
-0:44:30 - MMT 1972 Jan 7 # approximately MMT
...
...
@@ -542,7 +542,7 @@ Rule Libya 1997 only - Apr 4 0:00 1:00 S
Rule Libya 1997 only - Oct 4 0:00 0 -
Rule Libya 2013 only - Mar lastFri 1:00 1:00 S
Rule Libya 2013 only - Oct lastFri 2:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Tripoli 0:52:44 - LMT 1920
1:00 Libya CE%sT 1959
2:00 - EET 1982
...
...
@@ -652,7 +652,7 @@ Rule Mauritius 1982 only - Oct 10 0:00 1:00 -
Rule Mauritius 1983 only - Mar 21 0:00 0 -
Rule Mauritius 2008 only - Oct lastSun 2:00 1:00 -
Rule Mauritius 2009 only - Mar lastSun 2:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
4:00 Mauritius +04/+05
# Agalega Is, Rodriguez
...
...
@@ -883,18 +883,24 @@ Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis
# the week end after.... The government does not announce yet the decision
# about this temporary change. But it s 99% sure that it will be the case,
# as in previous years. An unofficial survey was done these days, showing
# that 64% of asked peop
k
e are ok for moving from +1 to +0 during Ramadan.
# that 64% of asked peop
l
e are ok for moving from +1 to +0 during Ramadan.
# https://leconomiste.com/article/1035870-enquete-l-economiste-sunergia-64-des-marocains-plebiscitent-le-gmt-pendant-ramadan
# From Naoufal Semlali (2019-04-16):
# Morocco will be on GMT starting from Sunday, May 5th 2019 at 3am.
# The switch to GMT+1 will occur on Sunday, June 9th 2019 at 2am....
# http://fr.le360.ma/societe/voici-la-date-du-retour-a-lheure-legale-au-maroc-188222
#
# From Paul Eggert (2018-11-01):
# For now, guess that Morocco will fall back at 03:00 the last Sunday
# before Ramadan, and spring forward at 02:00 the first Sunday after
# From Paul Eggert (2019-05-20):
# This agrees with our 2018-11-01 guess that the Moroccan government
# would continue the practice of falling back at 03:00 the last Sunday
# before Ramadan, and of springing forward at 02:00 the first Sunday after
# Ramadan, as this has been the practice since 2012. To implement this,
# transition dates for 2019 through 20
3
7 were determined by running the
# following program under GNU Emacs 26.
1
.
# transition dates for 2019 through 20
8
7 were determined by running the
# following program under GNU Emacs 26.
2
.
# (let ((islamic-year 1440))
# (require 'cal-islam)
# (while (< islamic-year 1
460
)
# (while (< islamic-year 1
511
)
# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year)))
# (b (calendar-islamic-to-absolute (list 10 1 islamic-year)))
# (sunday 0))
...
...
@@ -993,8 +999,114 @@ Rule Morocco 2036 only - Oct 19 3:00 0 -
Rule Morocco 2036 only - Nov 23 2:00 1:00 -
Rule Morocco 2037 only - Oct 4 3:00 0 -
Rule Morocco 2037 only - Nov 15 2:00 1:00 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Rule Morocco 2038 only - Sep 26 3:00 0 -
Rule Morocco 2038 only - Oct 31 2:00 1:00 -
Rule Morocco 2039 only - Sep 18 3:00 0 -
Rule Morocco 2039 only - Oct 23 2:00 1:00 -
Rule Morocco 2040 only - Sep 2 3:00 0 -
Rule Morocco 2040 only - Oct 14 2:00 1:00 -
Rule Morocco 2041 only - Aug 25 3:00 0 -
Rule Morocco 2041 only - Sep 29 2:00 1:00 -
Rule Morocco 2042 only - Aug 10 3:00 0 -
Rule Morocco 2042 only - Sep 21 2:00 1:00 -
Rule Morocco 2043 only - Aug 2 3:00 0 -
Rule Morocco 2043 only - Sep 6 2:00 1:00 -
Rule Morocco 2044 only - Jul 24 3:00 0 -
Rule Morocco 2044 only - Aug 28 2:00 1:00 -
Rule Morocco 2045 only - Jul 9 3:00 0 -
Rule Morocco 2045 only - Aug 20 2:00 1:00 -
Rule Morocco 2046 only - Jul 1 3:00 0 -
Rule Morocco 2046 only - Aug 5 2:00 1:00 -
Rule Morocco 2047 only - Jun 23 3:00 0 -
Rule Morocco 2047 only - Jul 28 2:00 1:00 -
Rule Morocco 2048 only - Jun 7 3:00 0 -
Rule Morocco 2048 only - Jul 19 2:00 1:00 -
Rule Morocco 2049 only - May 30 3:00 0 -
Rule Morocco 2049 only - Jul 4 2:00 1:00 -
Rule Morocco 2050 only - May 15 3:00 0 -
Rule Morocco 2050 only - Jun 26 2:00 1:00 -
Rule Morocco 2051 only - May 7 3:00 0 -
Rule Morocco 2051 only - Jun 11 2:00 1:00 -
Rule Morocco 2052 only - Apr 28 3:00 0 -
Rule Morocco 2052 only - Jun 2 2:00 1:00 -
Rule Morocco 2053 only - Apr 13 3:00 0 -
Rule Morocco 2053 only - May 25 2:00 1:00 -
Rule Morocco 2054 only - Apr 5 3:00 0 -
Rule Morocco 2054 only - May 10 2:00 1:00 -
Rule Morocco 2055 only - Mar 28 3:00 0 -
Rule Morocco 2055 only - May 2 2:00 1:00 -
Rule Morocco 2056 only - Mar 12 3:00 0 -
Rule Morocco 2056 only - Apr 23 2:00 1:00 -
Rule Morocco 2057 only - Mar 4 3:00 0 -
Rule Morocco 2057 only - Apr 8 2:00 1:00 -
Rule Morocco 2058 only - Feb 17 3:00 0 -
Rule Morocco 2058 only - Mar 31 2:00 1:00 -
Rule Morocco 2059 only - Feb 9 3:00 0 -
Rule Morocco 2059 only - Mar 16 2:00 1:00 -
Rule Morocco 2060 only - Feb 1 3:00 0 -
Rule Morocco 2060 only - Mar 7 2:00 1:00 -
Rule Morocco 2061 only - Jan 16 3:00 0 -
Rule Morocco 2061 only - Feb 27 2:00 1:00 -
Rule Morocco 2062 only - Jan 8 3:00 0 -
Rule Morocco 2062 only - Feb 12 2:00 1:00 -
Rule Morocco 2062 only - Dec 31 3:00 0 -
Rule Morocco 2063 only - Feb 4 2:00 1:00 -
Rule Morocco 2063 only - Dec 16 3:00 0 -
Rule Morocco 2064 only - Jan 20 2:00 1:00 -
Rule Morocco 2064 only - Dec 7 3:00 0 -
Rule Morocco 2065 only - Jan 11 2:00 1:00 -
Rule Morocco 2065 only - Nov 22 3:00 0 -
Rule Morocco 2066 only - Jan 3 2:00 1:00 -
Rule Morocco 2066 only - Nov 14 3:00 0 -
Rule Morocco 2066 only - Dec 19 2:00 1:00 -
Rule Morocco 2067 only - Nov 6 3:00 0 -
Rule Morocco 2067 only - Dec 11 2:00 1:00 -
Rule Morocco 2068 only - Oct 21 3:00 0 -
Rule Morocco 2068 only - Dec 2 2:00 1:00 -
Rule Morocco 2069 only - Oct 13 3:00 0 -
Rule Morocco 2069 only - Nov 17 2:00 1:00 -
Rule Morocco 2070 only - Oct 5 3:00 0 -
Rule Morocco 2070 only - Nov 9 2:00 1:00 -
Rule Morocco 2071 only - Sep 20 3:00 0 -
Rule Morocco 2071 only - Oct 25 2:00 1:00 -
Rule Morocco 2072 only - Sep 11 3:00 0 -
Rule Morocco 2072 only - Oct 16 2:00 1:00 -
Rule Morocco 2073 only - Aug 27 3:00 0 -
Rule Morocco 2073 only - Oct 8 2:00 1:00 -
Rule Morocco 2074 only - Aug 19 3:00 0 -
Rule Morocco 2074 only - Sep 23 2:00 1:00 -
Rule Morocco 2075 only - Aug 11 3:00 0 -
Rule Morocco 2075 only - Sep 15 2:00 1:00 -
Rule Morocco 2076 only - Jul 26 3:00 0 -
Rule Morocco 2076 only - Sep 6 2:00 1:00 -
Rule Morocco 2077 only - Jul 18 3:00 0 -
Rule Morocco 2077 only - Aug 22 2:00 1:00 -
Rule Morocco 2078 only - Jul 10 3:00 0 -
Rule Morocco 2078 only - Aug 14 2:00 1:00 -
Rule Morocco 2079 only - Jun 25 3:00 0 -
Rule Morocco 2079 only - Jul 30 2:00 1:00 -
Rule Morocco 2080 only - Jun 16 3:00 0 -
Rule Morocco 2080 only - Jul 21 2:00 1:00 -
Rule Morocco 2081 only - Jun 1 3:00 0 -
Rule Morocco 2081 only - Jul 13 2:00 1:00 -
Rule Morocco 2082 only - May 24 3:00 0 -
Rule Morocco 2082 only - Jun 28 2:00 1:00 -
Rule Morocco 2083 only - May 16 3:00 0 -
Rule Morocco 2083 only - Jun 20 2:00 1:00 -
Rule Morocco 2084 only - Apr 30 3:00 0 -
Rule Morocco 2084 only - Jun 11 2:00 1:00 -
Rule Morocco 2085 only - Apr 22 3:00 0 -
Rule Morocco 2085 only - May 27 2:00 1:00 -
Rule Morocco 2086 only - Apr 14 3:00 0 -
Rule Morocco 2086 only - May 19 2:00 1:00 -
Rule Morocco 2087 only - Mar 30 3:00 0 -
Rule Morocco 2087 only - May 4 2:00 1:00 -
# For dates after the somewhat-arbitrary cutoff of 2087, assume that
# Morocco will no longer observe DST. At some point this table will
# need to be extended, though quite possibly Morocco will change the
# rules first.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
0:00 Morocco +00/+01 1984 Mar 16
1:00 - +01 1986
...
...
@@ -1024,7 +1136,7 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf
# merely made it official?
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Maputo 2:10:20 - LMT 1903 Mar
2:00 - CAT
Link Africa/Maputo Africa/Blantyre # Malawi
...
...
@@ -1096,7 +1208,7 @@ Rule Namibia 1994 2017 - Sep Sun>=1 2:00 1:00 CAT
Rule Namibia 1995 2017 - Apr Sun>=1 2:00 0 WAT
# End of rearguard section.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8
1:30 - +0130 1903 Mar
2:00 - SAST 1942 Sep 20 2:00
...
...
@@ -1117,7 +1229,7 @@ Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8
# See Africa/Lagos.
# Nigeria
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Lagos 0:13:36 - LMT 1919 Sep
1:00 - WAT
Link Africa/Lagos Africa/Bangui # Central African Republic
...
...
@@ -1131,7 +1243,7 @@ Link Africa/Lagos Africa/Niamey # Niger
Link Africa/Lagos Africa/Porto-Novo # Benin
# Réunion
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis
4:00 - +04
#
...
...
@@ -1191,7 +1303,7 @@ Zone Africa/Sao_Tome 0:26:56 - LMT 1884
# See Africa/Abidjan.
# Seychelles
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria
4:00 - +04
# From Paul Eggert (2001-05-30):
...
...
@@ -1211,7 +1323,7 @@ Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 -
Rule SA 1943 1944 - Mar Sun>=15 2:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8
1:30 - SAST 1903 Mar
2:00 SA SAST
...
...
@@ -1246,14 +1358,14 @@ Rule Sudan 1970 only - May 1 0:00 1:00 S
Rule Sudan 1970 1985 - Oct 15 0:00 0 -
Rule Sudan 1971 only - Apr 30 0:00 1:00 S
Rule Sudan 1972 1985 - Apr lastSun 0:00 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Khartoum 2:10:08 - LMT 1931
2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT 2017 Nov 1
2:00 - CAT
# South Sudan
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Juba 2:06:28 - LMT 1931
2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT
...
...
@@ -1359,7 +1471,7 @@ Rule Tunisia 2006 2008 - Oct lastSun 2:00s 0 -
# Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
# more precise 0:09:21.
# Shanks & Pottenger say the 1911 switch was on Mar 9; go with Howse's Mar 11.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Africa/Tunis 0:40:44 - LMT 1881 May 12
0:09:21 - PMT 1911 Mar 11 # Paris Mean Time
1:00 Tunisia CE%sT
...
...
make/data/tzdata/antarctica
浏览文件 @
a495795c
...
...
@@ -36,7 +36,7 @@
# for information.
# Unless otherwise specified, we have no time zone information.
# FORMAT is '-00' and
GMT
OFF is 0 for locations while uninhabited.
# FORMAT is '-00' and
STD
OFF is 0 for locations while uninhabited.
# Argentina - year-round bases
# Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
...
...
@@ -93,7 +93,7 @@
# Australian Antarctica Division informed us that Casey changed time
# zone to UTC+11 in "the morning of 22nd October 2016".
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Antarctica/Casey 0 - -00 1969
8:00 - +08 2009 Oct 18 2:00
11:00 - +11 2010 Mar 5 2:00
...
...
@@ -165,7 +165,7 @@ Zone Antarctica/Mawson 0 - -00 1954 Feb 13
# St Paul Island - near Amsterdam, uninhabited
# fishing stations operated variously 1819/1931
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français
5:00 - +05
#
...
...
@@ -176,7 +176,7 @@ Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français
# Another base at Port-Martin, 50km east, began operation in 1947.
# It was destroyed by fire on 1952-01-14.
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Antarctica/DumontDUrville 0 - -00 1947
10:00 - +10 1952 Jan 14
0 - -00 1956 Nov
...
...
@@ -204,7 +204,7 @@ Zone Antarctica/DumontDUrville 0 - -00 1947
# Syowa station, which is the first antarctic station of Japan,
# was established on 1957-01-29. Since Syowa station is still the main
# station of Japan, it's appropriate for the principal location.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Antarctica/Syowa 0 - -00 1957 Jan 29
3:00 - +03
# See:
...
...
@@ -254,7 +254,7 @@ Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02
#Rule Troll 2004 max - Nov 7 1:00u 0:00 +00
# Remove the following line when uncommenting the above '#Rule' lines.
Rule Troll 2004 max - Oct lastSun 1:00u 0:00 +00
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Antarctica/Troll 0 - -00 2005 Feb 12
0:00 Troll %s
...
...
@@ -328,7 +328,7 @@ Zone Antarctica/Vostok 0 - -00 1957 Dec 16
# From Paul Eggert (2002-10-22)
# <http://webexhibits.org/daylightsaving/g.html> says Rothera is -03 all year.
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Antarctica/Rothera 0 - -00 1976 Dec 1
-3:00 - -03
...
...
make/data/tzdata/asia
浏览文件 @
a495795c
...
...
@@ -31,7 +31,7 @@
# tz@iana.org for general use in the future). For more, please see
# the file CONTRIBUTING in the tz distribution.
# From Paul Eggert (201
8-06-19
):
# From Paul Eggert (201
9-07-11
):
#
# Unless otherwise specified, the source for data through 1990 is:
# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
...
...
@@ -70,13 +70,13 @@
# 7:00 WIB west Indonesia (Waktu Indonesia Barat)
# 8:00 WITA central Indonesia (Waktu Indonesia Tengah)
# 8:00 CST China
# 8:00 PST PDT* Philippine Standard Time
# 8:00 HKT HKST Hong Kong (HKWT* for Winter Time in late 1941)
# 8:00 PST PDT* Philippines
# 8:30 KST KDT Korea when at +0830
# 9:00 WIT east Indonesia (Waktu Indonesia Timur)
# 9:00 JST JDT Japan
# 9:00 KST KDT Korea when at +09
# 9:30 ACST Australian Central Standard Time
# *I invented the abbreviation PDT; see "Philippines" below.
# *I invented the abbreviations HKWT and PDT; see below.
# Otherwise, these tables typically use numeric abbreviations like +03
# and +0330 for integer hour and minute UT offsets. Although earlier
# editions invented alphabetic time zone abbreviations for every
...
...
@@ -107,7 +107,7 @@ Rule RussiaAsia 1985 2010 - Mar lastSun 2:00s 1:00 -
Rule RussiaAsia 1996 2010 - Oct lastSun 2:00s 0 -
# Afghanistan
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Kabul 4:36:48 - LMT 1890
4:00 - +04 1945
4:30 - +0430
...
...
@@ -140,7 +140,7 @@ Zone Asia/Kabul 4:36:48 - LMT 1890
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Armenia 2011 only - Mar lastSun 2:00s 1:00 -
Rule Armenia 2011 only - Oct lastSun 2:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2
3:00 - +03 1957 Mar
4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s
...
...
@@ -166,7 +166,7 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Azer 1997 2015 - Mar lastSun 4:00 1:00 -
Rule Azer 1997 2015 - Oct lastSun 5:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Baku 3:19:24 - LMT 1924 May 2
3:00 - +03 1957 Mar
4:00 RussiaAsia +04/+05 1991 Mar 31 2:00s
...
...
@@ -254,7 +254,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2
Rule Dhaka 2009 only - Jun 19 23:00 1:00 -
Rule Dhaka 2009 only - Dec 31 24:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Dhaka 6:01:40 - LMT 1890
5:53:20 - HMT 1941 Oct # Howrah Mean Time?
6:30 - +0630 1942 May 15
...
...
@@ -264,7 +264,7 @@ Zone Asia/Dhaka 6:01:40 - LMT 1890
6:00 Dhaka +06/+07
# Bhutan
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu
5:30 - +0530 1987 Oct
6:00 - +06
...
...
@@ -275,13 +275,13 @@ Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu
# We have no information as to when standard time was introduced;
# assume it occurred in 1907, the same year as Mauritius (which
# then contained the Chagos Archipelago).
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Indian/Chagos 4:49:40 - LMT 1907
5:00 - +05 1996
6:00 - +06
# Brunei
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan
7:30 - +0730 1933
8:00 - +08
...
...
@@ -296,7 +296,7 @@ Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan
# of Greenwich." This refers to the period before Burma's transition to +0630,
# a transition for which Shanks is the only source.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Yangon 6:24:47 - LMT 1880 # or Rangoon
6:24:47 - RMT 1920 # Rangoon local time
6:30 - +0630 1942 May
...
...
@@ -584,7 +584,7 @@ Rule PRC 1987 1991 - Apr Sun>=11 2:00 1:00 D
# that the sort of users who prefer Asia/Urumqi now typically ignored the
# +08 mandate back then.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
# Beijing time, used throughout China; represented by Shanghai.
Zone Asia/Shanghai 8:05:43 - LMT 1901
8:00 Shang C%sT 1949 May 28
...
...
@@ -675,11 +675,50 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928
# https://i.imgur.com/05KkvtC.png
# * 1941-09-30, Hong Kong Daily Press, Winter Time Warning.
# https://i.imgur.com/dge4kFJ.png
# Also, the Liberation day of Hong Kong after WWII which British rule
# over the territory resumed was August 30, 1945, which I think should
# be the termination date for the use of JST in the territory....
# From Paul Eggert (2018-11-17):
# From Paul Eggert (2019-07-11):
# "Hong Kong winter time" is considered to be daylight saving.
# "Hong Kong had adopted daylight saving on June 15 as a wartime measure,
# clocks moving forward one hour until October 1, when they would be put back
# by just half an hour for 'Hong Kong Winter time', so that daylight saving
# operated year round." -- Low Z. The longest day: when wartime Hong Kong
# introduced daylight saving. South China Morning Post. 2019-06-28.
# https://www.scmp.com/magazines/post-magazine/short-reads/article/3016281/longest-day-when-wartime-hong-kong-introduced
# From P Chan (2018-12-31):
# * According to the Hong Kong Daylight-Saving Regulations, 1941, the
# 1941 spring-forward transition was at 03:00.
# http://sunzi.lib.hku.hk/hkgro/view/g1941/304271.pdf
# http://sunzi.lib.hku.hk/hkgro/view/g1941/305516.pdf
# * According to some articles from South China Morning Post, +08 was
# resumed on 1945-11-18 at 02:00.
# https://i.imgur.com/M2IsZ3c.png
# https://i.imgur.com/iOPqrVo.png
# https://i.imgur.com/fffcGDs.png
# * Some newspapers ... said the 1946 spring-forward transition was on
# 04-21 at 00:00. The Kung Sheung Evening News 1946-04-20 (Chinese)
# https://i.imgur.com/ZSzent0.png
# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2FH7zGe%2FKF%2BFLYsuqGhRBfe p.4
# The Kung Sheung Daily News 1946-04-21 (Chinese)
# https://i.imgur.com/7ecmRlcm.png
# https://mmis.hkpl.gov.hk///c/portal/cover?c=QF757YsWv5%2BQBGt1%2BwUj5qG2GqtwR3Wh p.4
# * According to the Summer Time Ordinance (1946), the fallback
# transitions between 1946 and 1952 were at 03:30 Standard Time (+08)
# http://oelawhk.lib.hku.hk/archive/files/bb74b06a74d5294620a15de560ab33c6.pdf
# * Some other laws and regulations related to DST from 1953 to 1979
# Summer Time Ordinance 1953
# https://i.imgur.com/IOlJMav.jpg
# Summer Time (Amendment) Ordinance 1965
# https://i.imgur.com/8rofeLa.jpg
# Interpretation and General Clauses Ordinance (1966)
# https://i.imgur.com/joy3msj.jpg
# Emergency (Summer Time) Regulation 1973 <https://i.imgur.com/OpRWrKz.jpg>
# Interpretation and General Clauses (Amendment) Ordinance 1977
# https://i.imgur.com/RaNqnc4.jpg
# Resolution of the Legislative Council passed on 9 May 1979
# https://www.legco.gov.hk/yr78-79/english/lc_sitg/hansard/h790509.pdf#page=39
# From Paul Eggert (2019-05-31):
# Here are the dates given at
# https://www.hko.gov.hk/gts/time/Summertime.htm
# as of 2014-06-19:
...
...
@@ -690,7 +729,7 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928
# 1944 Whole year
# 1945 Whole year
# 1946 20 Apr to 1 Dec
# 1947 13 Apr to 30
Dec
# 1947 13 Apr to 30
Nov
# 1948 2 May to 31 Oct
# 1949 3 Apr to 30 Oct
# 1950 2 Apr to 29 Oct
...
...
@@ -727,36 +766,28 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928
# The page does not give times of day for transitions,
# or dates for the 1942 and 1945 transitions.
# The Japanese occupation of Hong Kong began 1941-12-25.
# The Japanese surrender of Hong Kong was signed 1945-09-16; see:
# Heaver S. The days after the Pacific war ended: unsettling times
# in Hong Kong. Post Magazine. 2016-06-13.
# https://www.scmp.com/magazines/post-magazine/article/1852990/days-after-pacific-war-ended-unsettling-times-hong-kong
# For lack of anything better, use start of those days as the
# transition times.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule HK 1946 only - Apr 20 3:30 1:00 S
Rule HK 1946 only - Dec 1 3:30 0 -
Rule HK 1947 only - Apr 13 3:30 1:00 S
Rule HK 1947 only - Dec 30 3:30 0 -
Rule HK 1948 only - May 2 3:30 1:00 S
Rule HK 1948 1951 - Oct lastSun 3:30 0 -
Rule HK 1952 1953 - Nov Sun>=1 3:30 0 -
Rule HK 1946 only - Apr 21 0:00 1:00 S
Rule HK 1946 only - Dec 1 3:30s 0 -
Rule HK 1947 only - Apr 13 3:30s 1:00 S
Rule HK 1947 only - Nov 30 3:30s 0 -
Rule HK 1948 only - May 2 3:30s 1:00 S
Rule HK 1948 1952 - Oct Sun>=28 3:30s 0 -
Rule HK 1949 1953 - Apr Sun>=1 3:30 1:00 S
Rule HK 1953 1964 - Oct Sun>=31 3:30 0 -
Rule HK 1954 1964 - Mar Sun>=18 3:30 1:00 S
Rule HK 1954 only - Oct 31 3:30 0 -
Rule HK 1955 1964 - Nov Sun>=1 3:30 0 -
Rule HK 1965 1976 - Apr Sun>=16 3:30 1:00 S
Rule HK 1965 1976 - Oct Sun>=16 3:30 0 -
Rule HK 1973 only - Dec 30 3:30 1:00 S
Rule HK 1979 only - May
Sun>=8
3:30 1:00 S
Rule HK 1979 only - Oct
Sun>=16
3:30 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
Rule HK 1979 only - May
13
3:30 1:00 S
Rule HK 1979 only - Oct
21
3:30 0 -
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42
8:00 - HKT 1941 Jun 15 3:
3
0
8:00 - HKT 1941 Jun 15 3:
0
0
8:00 1:00 HKST 1941 Oct 1 4:00
8:
30 - HK
T 1941 Dec 25
9:00 - JST 1945
Sep 16
8:
00 0:30 HKW
T 1941 Dec 25
9:00 - JST 1945
Nov 18 2:00
8:00 HK HK%sT
###############################################################################
...
...
@@ -880,7 +911,7 @@ Rule Taiwan 1974 1975 - Oct 1 0:00 0 S
Rule Taiwan 1979 only - Jul 1 0:00 1:00 D
Rule Taiwan 1979 only - Oct 1 0:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
# Taipei or Taibei or T'ai-pei
Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1
8:00 - CST 1937 Oct 1
...
...
@@ -1018,7 +1049,7 @@ Rule Macau 1975 1976 - Apr Sun>=16 03:30 1:00 D
Rule Macau 1979 only - May 13 03:30 1:00 D
Rule Macau 1979 only - Oct Sun>=16 03:30 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Macau 7:34:10 - LMT 1904 Oct 30
8:00 - CST 1941 Dec 21 23:00
9:00 Macau +09/+10 1945 Sep 30 24:00
...
...
@@ -1057,7 +1088,7 @@ Rule Cyprus 1977 only - Sep 25 0:00 0 -
Rule Cyprus 1978 only - Oct 2 0:00 0 -
Rule Cyprus 1979 1997 - Sep lastSun 0:00 0 -
Rule Cyprus 1981 1998 - Mar lastSun 0:00 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14
2:00 Cyprus EE%sT 1998 Sep
2:00 EUAsia EE%sT
...
...
@@ -1106,7 +1137,7 @@ Link Asia/Nicosia Europe/Nicosia
# Byalokoz 1919 says Georgia was 2:59:11.
# Go with Byalokoz.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Tbilisi 2:59:11 - LMT 1880
2:59:11 - TBMT 1924 May 2 # Tbilisi Mean Time
3:00 - +03 1957 Mar
...
...
@@ -1143,7 +1174,7 @@ Zone Asia/Tbilisi 2:59:11 - LMT 1880
# which will be permanent, with no seasonal adjustment, will happen at
# midnight on Saturday, September 16.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1
8:00 - +08 1942 Feb 21 23:00
9:00 - +09 1976 May 3
...
...
@@ -1209,7 +1240,7 @@ Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1
# time for 1870-1941. Shanks is our only (and dubious) source for the
# 1941-1945 data.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata
5:53:20 - HMT 1870 # Howrah Mean Time?
5:21:10 - MMT 1906 Jan 1 # Madras local time
...
...
@@ -1261,7 +1292,7 @@ Zone Asia/Kolkata 5:53:28 - LMT 1854 Jun 28 # Kolkata
# WITA - +08 - Waktu Indonesia Tengah (Indonesia central time)
# WIT - +09 - Waktu Indonesia Timur (Indonesia eastern time)
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
# Java, Sumatra
Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10
# Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13,
...
...
@@ -1337,9 +1368,9 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov
# I used the following code in GNU Emacs 26.1 to generate the "Rule Iran"
# lines from 2008 through 2087. Emacs 26.1 uses Ed Reingold's
# cal-persia implementation of Birashk's approximation, which in the
# 2008-2087 range disagrees with the
the
astronomical Persian calendar
# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058),
#
so the following code special-case
those years. See Table 15.1, page 264, of:
# 2008-2087 range disagrees with the astronomical Persian calendar
# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058),
so
#
the following code special-cases
those years. See Table 15.1, page 264, of:
# Edward M. Reingold and Nachum Dershowitz, Calendrical Calculations:
# The Ultimate Edition, Cambridge University Press (2018).
# https://www.cambridge.org/fr/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition
...
...
@@ -1533,7 +1564,7 @@ Rule Iran 2087 only - Sep 21 24:00 0 -
Rule Iran 2088 max - Mar 20 24:00 1:00 -
Rule Iran 2088 max - Sep 20 24:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Tehran 3:25:44 - LMT 1916
3:25:44 - TMT 1946 # Tehran Mean Time
3:30 - +0330 1977 Nov
...
...
@@ -1578,7 +1609,7 @@ Rule Iraq 1986 1990 - Mar lastSun 1:00s 1:00 -
#
Rule Iraq 1991 2007 - Apr 1 3:00s 1:00 -
Rule Iraq 1991 2007 - Oct 1 3:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Baghdad 2:57:40 - LMT 1890
2:57:36 - BMT 1918 # Baghdad Mean Time?
3:00 - +03 1982 May
...
...
@@ -1645,7 +1676,7 @@ Rule Zion 1975 only - Apr 20 0:00 1:00 D
Rule Zion 1975 only - Aug 31 0:00 0 S
# From Alois Treindl (2019-03-06):
# http://www.moin.gov.il/Documents/שעון
קיץ/clock-50-years-7-2014.pdf
# http://www.moin.gov.il/Documents/שעון
%20
קיץ/clock-50-years-7-2014.pdf
# From Isaac Starkman (2019-03-06):
# Summer time was in that period in 1980 and 1984, see
# https://www.ynet.co.il/articles/0,7340,L-3951073,00.html
...
...
@@ -1783,32 +1814,15 @@ Rule Zion 2004 only - Sep 22 1:00 0 S
#
# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps
# From Paul Eggert (2012-10-26):
# I used Ephraim Silverberg's dst-israel.el program
# <ftp://ftp.cs.huji.ac.il/pub/tz/software/dst-israel.el> (2005-02-20)
# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4,
# to generate the transitions from 2005 through 2012.
# (I replaced "lastFri" with "Fri>=26" by hand.)
# The spring transitions all correspond to the following Rule:
#
# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D
#
# but older zic implementations (e.g., Solaris 8) do not support
# "Fri>=26" to mean April 1 in years like 2005, so for now we list the
# springtime transitions explicitly.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Zion 2005
only - Apr
1 2:00 1:00 D
Rule Zion 2005
2012 - Apr Fri<=
1 2:00 1:00 D
Rule Zion 2005 only - Oct 9 2:00 0 S
Rule Zion 2006 2010 - Mar Fri>=26 2:00 1:00 D
Rule Zion 2006 only - Oct 1 2:00 0 S
Rule Zion 2007 only - Sep 16 2:00 0 S
Rule Zion 2008 only - Oct 5 2:00 0 S
Rule Zion 2009 only - Sep 27 2:00 0 S
Rule Zion 2010 only - Sep 12 2:00 0 S
Rule Zion 2011 only - Apr 1 2:00 1:00 D
Rule Zion 2011 only - Oct 2 2:00 0 S
Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D
Rule Zion 2012 only - Sep 23 2:00 0 S
# From Ephraim Silverberg (2013-06-27):
...
...
@@ -1824,7 +1838,7 @@ Rule Zion 2012 only - Sep 23 2:00 0 S
Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D
Rule Zion 2013 max - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Jerusalem 2:20:54 - LMT 1880
2:20:40 - JMT 1918 # Jerusalem Mean Time?
2:00 Zion I%sT
...
...
@@ -1916,7 +1930,7 @@ Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D
# Central Time (UT+9). The adoption began on Oct 1, 1937.
# https://ja.wikisource.org/wiki/明治二十八年勅令第百六十七號標準時ニ關スル件中改正ノ件
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
9:00 Japan J%sT
# Since 1938, all Japanese possessions have been like Asia/Tokyo,
...
...
@@ -2019,7 +2033,7 @@ Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 -
Rule Jordan 2013 only - Dec 20 0:00 0 -
Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S
Rule Jordan 2014 max - Oct lastFri 0:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Amman 2:23:44 - LMT 1931
2:00 Jordan EE%sT
...
...
@@ -2060,8 +2074,8 @@ Zone Asia/Amman 2:23:44 - LMT 1931
# text.
#
# According to Izvestia newspaper No. 68 (23334) from 1991-03-20
#
(
page 6; available at http://libinfo.org/newsr/newsr2574.djvu via
# http://libinfo.org/index.php?id=58564
)
on 1991-03-31 at 2:00 during
#
--
page 6; available at http://libinfo.org/newsr/newsr2574.djvu via
# http://libinfo.org/index.php?id=58564
--
on 1991-03-31 at 2:00 during
# transition to "summer" time:
# Republic of Georgia, Latvian SSR, Lithuanian SSR, SSR Moldova,
# Estonian SSR; Komi ASSR; Kaliningrad oblast; Nenets autonomous okrug
...
...
@@ -2077,7 +2091,7 @@ Zone Asia/Amman 2:23:44 - LMT 1931
# Apparently there were last minute changes. Apparently Kazakh act No. 170
# was one of such changes.
#
# https://ru.wikipedia.org/wiki/Декретное
время
# https://ru.wikipedia.org/wiki/Декретное
_
время
# claims that Sovetskaya Rossiya newspaper on 1991-03-29 published that
# Nenets autonomous okrug, Komi and Kazakhstan (excluding Uralsk oblast)
# were to not move clocks and Uralsk oblast was to move clocks
...
...
@@ -2216,7 +2230,7 @@ Zone Asia/Amman 2:23:44 - LMT 1931
# UTC+6 to UTC+5 effective December 21st, 2018. The legal document is
# located here: http://adilet.zan.kz/rus/docs/P1800000817 (russian language).
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
#
# Almaty (formerly Alma-Ata), representing most locations in Kazakhstan
# This includes KZ-AKM, KZ-ALA, KZ-ALM, KZ-AST, KZ-BAY, KZ-VOS, KZ-ZHA,
...
...
@@ -2318,7 +2332,7 @@ Rule Kyrgyz 1992 1996 - Apr Sun>=7 0:00s 1:00 -
Rule Kyrgyz 1992 1996 - Sep lastSun 0:00 0 -
Rule Kyrgyz 1997 2005 - Mar lastSun 2:30 1:00 -
Rule Kyrgyz 1997 2004 - Oct lastSun 2:30 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Bishkek 4:58:24 - LMT 1924 May 2
5:00 - +05 1930 Jun 21
6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s
...
...
@@ -2433,11 +2447,11 @@ Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S
# The BBC reported that the transition was from 23:30 to 24:00 today.
# https://www.bbc.com/news/world-asia-44010705
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1
8:30 - KST 1912 Jan 1
9:00 - JST 1945 Sep 8
9:00
- KS
T 1954 Mar 21
9:00
ROK K%s
T 1954 Mar 21
8:30 ROK K%sT 1961 Aug 10
9:00 ROK K%sT
Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1
...
...
@@ -2482,7 +2496,7 @@ Rule Lebanon 1992 only - Oct 4 0:00 0 -
Rule Lebanon 1993 max - Mar lastSun 0:00 1:00 S
Rule Lebanon 1993 1998 - Sep lastSun 0:00 0 -
Rule Lebanon 1999 max - Oct lastSun 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Beirut 2:22:00 - LMT 1880
2:00 Lebanon EE%sT
...
...
@@ -2494,7 +2508,7 @@ Rule NBorneo 1935 1941 - Dec 14 0:00 0 -
# peninsular Malaysia
# taken from Mok Ly Yng (2003-10-30)
# http://www.math.nus.edu.sg/aslaksen/teaching/timezone.html
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Kuala_Lumpur 6:46:46 - LMT 1901 Jan 1
6:55:25 - SMT 1905 Jun 1 # Singapore M.T.
7:00 - +07 1933 Jan 1
...
...
@@ -2508,7 +2522,7 @@ Zone Asia/Kuala_Lumpur 6:46:46 - LMT 1901 Jan 1
# From Paul Eggert (2014-08-12):
# The data entries here are mostly from Shanks & Pottenger, but the 1942, 1945
# and 1982 transition dates are from Mok Ly Yng.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Kuching 7:21:20 - LMT 1926 Mar
7:30 - +0730 1933
8:00 NBorneo +08/+0820 1942 Feb 16
...
...
@@ -2516,7 +2530,7 @@ Zone Asia/Kuching 7:21:20 - LMT 1926 Mar
8:00 - +08
# Maldives
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Indian/Maldives 4:54:00 - LMT 1880 # Malé
4:54:00 - MMT 1960 # Malé Mean Time
5:00 - +05
...
...
@@ -2659,7 +2673,7 @@ Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 -
Rule Mongol 2015 2016 - Mar lastSat 2:00 1:00 -
Rule Mongol 2015 2016 - Sep lastSat 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
# Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta
Zone Asia/Hovd 6:06:36 - LMT 1905 Aug
6:00 - +06 1978
...
...
@@ -2677,7 +2691,7 @@ Zone Asia/Choibalsan 7:38:00 - LMT 1905 Aug
8:00 Mongol +08/+09
# Nepal
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Kathmandu 5:41:16 - LMT 1920
5:30 - +0530 1986
5:45 - +0545
...
...
@@ -2827,7 +2841,7 @@ Rule Pakistan 2008 only - Jun 1 0:00 1:00 S
Rule Pakistan 2008 2009 - Nov 1 0:00 0 -
Rule Pakistan 2009 only - Apr 15 0:00 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Karachi 4:28:12 - LMT 1907
5:30 - +0530 1942 Sep
5:30 1:00 +0630 1945 Oct 15
...
...
@@ -3114,13 +3128,21 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# http://www.palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e7a42ab7-ee23-435a-b9c8-a4f7e81f3817
# From Even Scharning (2019-03-23):
# DST in Palestine will start on 30 March this year, not 23 March as the time
# zone database predicted.
# https://ramallah.news/post/123610
# http://pnn.ps/news/401130
# http://palweather.ps/ar/node/50136.html
#
# From Sharif Mustafa (2019-03-26):
# The Palestinian cabinet announced today that the switch to DST will
# be on Fri Mar 29th 2019 by advancing the clock by 60 minutes.
# The decree signing date is Mar 12th but it was not published till today.
# The decree does not specify the exact time of switch.
# http://palestinecabinet.gov.ps/Website/AR/NDecrees/ViewFile.ashx?ID=e54e9ea1-50ee-4137-84df-0d6c78da259b
#
# From Even Scharning (2019-04-10):
# Our source in Palestine said it happened Friday 29 at 00:00 local time....
#
# From Tim Parenti (2019-03-23):
# Combining this with the rules observed since 2016, adjust our spring
# transition guess to Mar Sat>=24.
# From Paul Eggert (2019-04-10):
# For now, guess spring-ahead transitions are March's last Friday at 00:00.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
...
...
@@ -3151,10 +3173,11 @@ Rule Palestine 2012 only - Sep 21 1:00 0 -
Rule Palestine 2013 only - Sep Fri>=21 0:00 0 -
Rule Palestine 2014 2015 - Oct Fri>=21 0:00 0 -
Rule Palestine 2015 only - Mar lastFri 24:00 1:00 S
Rule Palestine 2016
max
- Mar Sat>=24 1:00 1:00 S
Rule Palestine 2016
2018
- Mar Sat>=24 1:00 1:00 S
Rule Palestine 2016 max - Oct lastSat 1:00 0 -
Rule Palestine 2019 max - Mar lastFri 0:00 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
2:00 Zion EET/EEST 1948 May 15
2:00 EgyptAsia EE%sT 1967 Jun 5
...
...
@@ -3228,7 +3251,7 @@ Rule Phil 1954 only - Apr 12 0:00 1:00 D
Rule Phil 1954 only - Jul 1 0:00 0 S
Rule Phil 1978 only - Mar 22 0:00 1:00 D
Rule Phil 1978 only - Sep 21 0:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31
8:04:00 - LMT 1899 May 11
8:00 Phil P%sT 1942 May
...
...
@@ -3236,7 +3259,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31
8:00 Phil P%sT
# Qatar
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha
4:00 - +04 1972 Jun
3:00 - +03
...
...
@@ -3284,7 +3307,7 @@ Link Asia/Qatar Asia/Bahrain
# the country. Presumably this is documenting airline time. Ignore this,
# as it's before our 1970 cutoff.
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14
3:00 - +03
Link Asia/Riyadh Asia/Aden # Yemen
...
...
@@ -3293,7 +3316,7 @@ Link Asia/Riyadh Asia/Kuwait
# Singapore
# taken from Mok Ly Yng (2003-10-30)
# http://www.math.nus.edu.sg/aslaksen/teaching/timezone.html
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1
6:55:25 - SMT 1905 Jun 1 # Singapore M.T.
7:00 - +07 1933 Jan 1
...
...
@@ -3357,7 +3380,7 @@ Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1
# even worse. For now, let's use a numeric abbreviation; we can
# switch to "SLST" if it catches on.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Colombo 5:19:24 - LMT 1880
5:19:32 - MMT 1906 # Moratuwa Mean Time
5:30 - +0530 1942 Jan 5
...
...
@@ -3527,13 +3550,13 @@ Rule Syria 2010 2011 - Apr Fri>=1 0:00 1:00 S
Rule Syria 2012 max - Mar lastFri 0:00 1:00 S
Rule Syria 2009 max - Oct lastFri 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Damascus 2:25:12 - LMT 1920 # Dimashq
2:00 Syria EE%sT
# Tajikistan
# From Shanks & Pottenger.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2
5:00 - +05 1930 Jun 21
6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s
...
...
@@ -3541,7 +3564,7 @@ Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2
5:00 - +05
# Thailand
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Bangkok 6:42:04 - LMT 1880
6:42:04 - BMT 1920 Apr # Bangkok Mean Time
7:00 - +07
...
...
@@ -3550,7 +3573,7 @@ Link Asia/Bangkok Asia/Vientiane # Laos
# Turkmenistan
# From Shanks & Pottenger.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Ashgabat 3:53:32 - LMT 1924 May 2 # or Ashkhabad
4:00 - +04 1930 Jun 21
5:00 RussiaAsia +05/+06 1991 Mar 31 2:00
...
...
@@ -3558,14 +3581,14 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 May 2 # or Ashkhabad
5:00 - +05
# United Arab Emirates
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Dubai 3:41:12 - LMT 1920
4:00 - +04
Link Asia/Dubai Asia/Muscat # Oman
# Uzbekistan
# Byalokoz 1919 says Uzbekistan was 4:27:53.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Samarkand 4:27:53 - LMT 1924 May 2
4:00 - +04 1930 Jun 21
5:00 - +05 1981 Apr 1
...
...
@@ -3613,7 +3636,7 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
# and in South Vietnam in particular (after 1954):
# To 07:00 on 1911-05-01.
# To 08:00 on 1942-12-31 at 23:00.
# To 09:00
i
n 1945-03-14 at 23:00.
# To 09:00
o
n 1945-03-14 at 23:00.
# To 07:00 on 1945-09-02 in Vietnam.
# To 08:00 on 1947-04-01 in French-controlled Indochina.
# To 07:00 on 1955-07-01 in South Vietnam.
...
...
@@ -3631,7 +3654,7 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
# Lê Thành Lân: "Lịch hai thế kỷ (1802-2010) và các lịch vĩnh cửu",
# NXB Thuận Hoá, Huế, 1995.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1
7:06:30 - PLMT 1911 May 1 # Phù Liễn MT
7:00 - +07 1942 Dec 31 23:00
...
...
make/data/tzdata/australasia
浏览文件 @
a495795c
...
...
@@ -48,7 +48,7 @@ Rule Aus 1943 only - Oct 3 2:00 1:00 D
# says W Australia didn't use DST in 1943/1944. Ignore Whitman's claim that
# 1944/1945 was just like 1943/1944.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
# Northern Territory
Zone Australia/Darwin 8:43:20 - LMT 1895 Feb
9:00 - ACST 1899 May
...
...
@@ -125,7 +125,7 @@ Rule AS 2006 only - Apr 2 2:00s 0 S
Rule AS 2007 only - Mar lastSun 2:00s 0 S
Rule AS 2008 max - Apr Sun>=1 2:00s 0 S
Rule AS 2008 max - Oct Sun>=1 2:00s 1:00 D
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Australia/Adelaide 9:14:20 - LMT 1895 Feb
9:00 - ACST 1899 May
9:30 Aus AC%sT 1971
...
...
@@ -157,7 +157,7 @@ Rule AT 2001 max - Oct Sun>=1 2:00s 1:00 D
Rule AT 2006 only - Apr Sun>=1 2:00s 0 S
Rule AT 2007 only - Mar lastSun 2:00s 0 S
Rule AT 2008 max - Apr Sun>=1 2:00s 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Australia/Hobart 9:49:16 - LMT 1895 Sep
10:00 - AEST 1916 Oct 1 2:00
10:00 1:00 AEDT 1917 Feb
...
...
@@ -185,7 +185,7 @@ Rule AV 2006 only - Apr Sun>=1 2:00s 0 S
Rule AV 2007 only - Mar lastSun 2:00s 0 S
Rule AV 2008 max - Apr Sun>=1 2:00s 0 S
Rule AV 2008 max - Oct Sun>=1 2:00s 1:00 D
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Australia/Melbourne 9:39:52 - LMT 1895 Feb
10:00 Aus AE%sT 1971
10:00 AV AE%sT
...
...
@@ -208,7 +208,7 @@ Rule AN 2006 only - Apr Sun>=1 2:00s 0 S
Rule AN 2007 only - Mar lastSun 2:00s 0 S
Rule AN 2008 max - Apr Sun>=1 2:00s 0 S
Rule AN 2008 max - Oct Sun>=1 2:00s 1:00 D
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Australia/Sydney 10:04:52 - LMT 1895 Feb
10:00 Aus AE%sT 1971
10:00 AN AE%sT
...
...
@@ -279,14 +279,14 @@ Zone Antarctica/Macquarie 0 - -00 1899 Nov
11:00 - +11
# Christmas
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Indian/Christmas 7:02:52 - LMT 1895 Feb
7:00 - +07
# Cocos (Keeling) Is
# These islands were ruled by the Ross family from about 1830 to 1978.
# We don't know when standard time was introduced; for now, we guess 1900.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Indian/Cocos 6:27:40 - LMT 1900
6:30 - +0630
...
...
@@ -390,13 +390,18 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
# From Raymond Kumar (2018-07-13):
# http://www.fijitimes.com/government-approves-2018-daylight-saving/
# ... The daylight saving period will end at 3am on Sunday January 13, 2019.
#
# From Paul Eggert (2018-07-15):
# For now, guess DST from 02:00 the first Sunday in November to 03:00
# the first Sunday on or after January 13. January transitions reportedly
# From Paul Eggert (2019-08-06):
# Today Raymond Kumar reported the Government of Fiji Gazette Supplement No. 27
# (2019-08-02) said that Fiji observes DST "commencing at 2.00 am on
# Sunday, 10 November 2019 and ending at 3.00 am on Sunday, 12 January 2020."
# For now, guess DST from 02:00 the second Sunday in November to 03:00
# the first Sunday on or after January 12. January transitions reportedly
# depend on when school terms start. Although the guess is ad hoc, it matches
# transitions since late 2014 and seems more likely to match future
# practice than guessing no DST.
# transitions planned this year and seems more likely to match future practice
# than guessing no DST.
# From Michael Deckers (2019-08-06):
# https://www.laws.gov.fj/LawsAsMade/downloadfile/848
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 -
...
...
@@ -407,14 +412,15 @@ Rule Fiji 2010 2013 - Oct Sun>=21 2:00 1:00 -
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 -
Rule Fiji 2015 max - Jan Sun>=13 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Rule Fiji 2014 2018 - Nov Sun>=1 2:00 1:00 -
Rule Fiji 2015 max - Jan Sun>=12 3:00 0 -
Rule Fiji 2019 max - Nov Sun>=8 2:00 1:00 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji +12/+13
# French Polynesia
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Gambier -8:59:48 - LMT 1912 Oct # Rikitea
-9:00 - -09
Zone Pacific/Marquesas -9:18:00 - LMT 1912 Oct
...
...
@@ -457,7 +463,7 @@ Rule Guam 1977 only - Apr 24 2:00 1:00 D
# http://documents.guam.gov/wp-content/uploads/E.O.-77-18-Guam-Standard-Time.pdf
Rule Guam 1977 only - Aug 28 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Guam -14:21:00 - LMT 1844 Dec 31
9:39:00 - LMT 1901 # Agana
10:00 - GST 1941 Dec 10 # Guam
...
...
@@ -467,7 +473,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 Dec 31
Link Pacific/Guam Pacific/Saipan # N Mariana Is
# Kiribati
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki
12:00 - +12
Zone Pacific/Enderbury -11:24:20 - LMT 1901
...
...
@@ -483,7 +489,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 1901
# See Pacific/Guam.
# Marshall Is
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Majuro 11:24:48 - LMT 1901
11:00 - +11 1914 Oct
9:00 - +09 1919 Feb 1
...
...
@@ -501,7 +507,7 @@ Zone Pacific/Kwajalein 11:09:20 - LMT 1901
12:00 - +12
# Micronesia
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Chuuk -13:52:52 - LMT 1844 Dec 31
10:07:08 - LMT 1901
10:00 - +10 1914 Oct
...
...
@@ -529,7 +535,7 @@ Zone Pacific/Kosrae -13:08:04 - LMT 1844 Dec 31
11:00 - +11
# Nauru
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Nauru 11:07:40 - LMT 1921 Jan 15 # Uaobe
11:30 - +1130 1942 Aug 29
9:00 - +09 1945 Sep 8
...
...
@@ -543,7 +549,7 @@ Rule NC 1978 1979 - Feb 27 0:00 0 -
Rule NC 1996 only - Dec 1 2:00s 1:00 -
# Shanks & Pottenger say the following was at 2:00; go with IATA.
Rule NC 1997 only - Mar 2 2:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Noumea 11:05:48 - LMT 1912 Jan 13 # Nouméa
11:00 NC +11/+12
...
...
@@ -582,7 +588,7 @@ Rule NZ 2007 max - Sep lastSun 2:00s 1:00 D
Rule Chatham 2007 max - Sep lastSun 2:45s 1:00 -
Rule NZ 2008 max - Apr Sun>=1 2:00s 0 S
Rule Chatham 2008 max - Apr Sun>=1 2:45s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Auckland 11:39:04 - LMT 1868 Nov 2
11:30 NZ NZ%sT 1946 Jan 1
12:00 NZ NZ%sT
...
...
@@ -608,7 +614,7 @@ Link Pacific/Auckland Antarctica/McMurdo
Rule Cook 1978 only - Nov 12 0:00 0:30 -
Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 -
Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua
-10:30 - -1030 1978 Nov 12
-10:00 Cook -10/-0930
...
...
@@ -617,29 +623,30 @@ Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua
# Niue
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi
-11:20 - -1120 1951
-11:30 - -1130 1978 Oct 1
-11:00 - -11
# Norfolk
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston
11:12 - +1112 1951
11:30 - +1130 1974 Oct 27 02:00
11:30 1:00 +1230 1975 Mar 2 02:00
11:30 - +1130 2015 Oct 4 02:00
11:00 - +11
11:30 - +1130 1974 Oct 27 02:00s
11:30 1:00 +1230 1975 Mar 2 02:00s
11:30 - +1130 2015 Oct 4 02:00s
11:00 - +11 2019 Jul
11:00 AN +11/+12
# Palau (Belau)
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Palau -15:02:04 - LMT 1844 Dec 31 # Koror
8:57:56 - LMT 1901
9:00 - +09
# Papua New Guinea
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Port_Moresby 9:48:40 - LMT 1880
9:48:32 - PMMT 1895 # Port Moresby Mean Time
10:00 - +10
...
...
@@ -669,7 +676,7 @@ Zone Pacific/Bougainville 10:22:16 - LMT 1880
11:00 - +11
# Pitcairn
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Pitcairn -8:40:20 - LMT 1901 # Adamstown
-8:30 - -0830 1998 Apr 27 0:00
-8:00 - -08
...
...
@@ -754,7 +761,7 @@ Rule WS 2011 only - Apr Sat>=1 4:00 0 -
Rule WS 2011 only - Sep lastSat 3:00 1 -
Rule WS 2012 max - Apr Sun>=1 4:00 0 -
Rule WS 2012 max - Sep lastSun 3:00 1 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Apia 12:33:04 - LMT 1892 Jul 5
-11:26:56 - LMT 1911
-11:30 - -1130 1950
...
...
@@ -763,7 +770,7 @@ Zone Pacific/Apia 12:33:04 - LMT 1892 Jul 5
# Solomon Is
# excludes Bougainville, for which see Papua New Guinea
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara
11:00 - +11
...
...
@@ -786,7 +793,7 @@ Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara
# was "11 hours slow on G.M.T." Go with Thorsen and assume Shanks & Pottenger
# are off by an hour starting in 1901.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Fakaofo -11:24:56 - LMT 1901
-11:00 - -11 2011 Dec 30
13:00 - +13
...
...
@@ -799,14 +806,14 @@ Rule Tonga 2000 2001 - Nov Sun>=1 2:00 1:00 -
Rule Tonga 2001 2002 - Jan lastSun 2:00 0 -
Rule Tonga 2016 only - Nov Sun>=1 2:00 1:00 -
Rule Tonga 2017 only - Jan Sun>=15 3:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Tongatapu 12:19:20 - LMT 1901
12:20 - +1220 1941
13:00 - +13 1999
13:00 Tonga +13/+14
# Tuvalu
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Funafuti 11:56:52 - LMT 1901
12:00 - +12
...
...
@@ -867,7 +874,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
# uninhabited since World War II; was probably like Pacific/Kiritimati
# Wake
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Wake 11:06:28 - LMT 1901
12:00 - +12
...
...
@@ -880,12 +887,12 @@ Rule Vanuatu 1984 only - Oct 23 0:00 1:00 -
Rule Vanuatu 1985 1991 - Sep Sun>=23 0:00 1:00 -
Rule Vanuatu 1992 1993 - Jan Sun>=23 0:00 0 -
Rule Vanuatu 1992 only - Oct Sun>=23 0:00 1:00 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
11:00 Vanuatu +11/+12
# Wallis and Futuna
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Wallis 12:15:20 - LMT 1901
12:00 - +12
...
...
@@ -1271,6 +1278,22 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# in WA or its introduction in SA had anything to do with the genesis
# of this time zone. My hunch is that it's been around since well
# before 1975. I remember seeing it noted on road maps decades ago.
#
# From Gilmore Davidson (2019-04-08):
# https://www.abc.net.au/news/2019-04-08/this-remote-stretch-of-desert-has-its-own-custom-time-zone/10981000
# ... include[s] a rough description of the geographical boundaries...
# "The time zone exists for about 340 kilometres and takes in the tiny
# roadhouse communities of Cocklebiddy, Madura, Eucla and Border Village."
# ... and an indication that the zone has definitely been in existence
# since before the 1970 cut-off of the database ...
# From Paul Eggert (2019-05-17):
# That ABC Esperance story by Christien de Garis also says:
# Although the Central Western Time Zone is not officially recognised (your
# phones won't automatically change), there is a sign instructing you which
# way to wind your clocks 45 minutes and scrawled underneath one of them in
# Texta is the word: 'Why'?
# "Good question," Mr Pike said.
# "I don't even know that, and it's been going for over 50 years."
# From Paul Eggert (2006-12-15):
# For lack of better info, assume the tradition dates back to the
...
...
@@ -1589,6 +1612,42 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
###############################################################################
# Bonin (Ogasawara) Islands and Marcus Island (Minami-Tori-shima)
# From Wakaba (2019-01-28) via Phake Nick:
# National Diet Library of Japan has several reports by Japanese Government
# officers that describe the time used in islands when they visited there.
# According to them (and other sources such as newspapers), standard time UTC
# + 10 (JST + 1) and DST UTC + 11 (JST + 2) was used until its return to Japan
# at 1968-06-26 00:00 JST. The exact periods of DST are still unknown.
# I guessed Guam, Mariana, and Bonin and Marcus districts might have
# synchronized their DST periods, but reports imply they had their own
# decisions, i.e. there were three or more different time zones....
#
# https://wiki.suikawiki.org/n/小笠原諸島の標準時
# From Phake Nick (2019-02-12):
# Because their last time change to return to Japanese time when they returned
# to Japanese rule was right before 1970, ... per the current tz database
# rule, the information doesn't warrant creation of a new timezone for Bonin
# Islands itself and is thus as an anecdotal note for interest purpose only.
# ... [The abovementioned link] described some special timekeeping phenomenon
# regarding Marcus island, another remote island currently owned by Japanese
# in the same administrative unit as Bonin Islands. Many reports claim that
# the American coastal guard on the American quarter of the island use its own
# coastal guard time, and most sources describe the time as UTC+11, being two
# hours faster than JST used by some Japanese personnel on the island. Some
# sites describe it as same as Wake Island/Guam time although it would be
# incorrect to be same as Guam. And then in a few Japanese governmental
# report from 1980s (from National Institute of Information and Communications
# Technology) regarding the construction of VLBI facility on the Marcus
# Island, it claimed that there are three time standards being used on the
# island at the time which include not just JST (UTC+9) or [US]CG time
# (UTC+11) but also a JMSDF time (UTC+10) (Japan Maritime Self-Defense
# Force). Unfortunately there are no other sources that mentioned such time
# and there are also no information on things like how the time was used.
# Fiji
# Howse writes (p 153) that in 1879 the British governor of Fiji
...
...
@@ -1846,12 +1905,21 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# ... at 12.30 am (by legal time in New South Wales) on 4 October 2015.
# http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf
# From Paul Eggert (201
5-09-23
):
# From Paul Eggert (201
9-08-28
):
# Transitions before 2015 are from timeanddate.com, which consulted
# the Norfolk Island Museum and the Australian Bureau of Meteorology's
# Norfolk Island station, and found no record of Norfolk observing DST
# other than in 1974/5. See:
# https://www.timeanddate.com/time/australia/norfolk-island.html
# However, disagree with timeanddate about the 1975-03-02 transition;
# timeanddate has 02:00 but 02:00s corresponds to what the NSW law said
# (thanks to Michael Deckers).
# Norfolk started observing Australian DST in spring 2019.
# From Kyle Czech (2019-08-13):
# https://www.legislation.gov.au/Details/F2018L01702
# From Michael Deckers (2019-08-14):
# https://www.legislation.gov.au/Details/F2019C00010
# Palau
# See commentary for Micronesia.
...
...
make/data/tzdata/europe
浏览文件 @
a495795c
...
...
@@ -145,7 +145,7 @@
# position is 51° 28' 30" N, 0° 18' 45" W. The longitude should
# be within about ±2". The Ordnance Survey grid reference is TQ172761.
#
# [This yields
GMT
OFF = -0:01:15 for London LMT in the 18th century.]
# [This yields
STD
OFF = -0:01:15 for London LMT in the 18th century.]
# From Paul Eggert (1993-11-18):
#
...
...
@@ -523,7 +523,7 @@ Rule GB-Eire 1990 1995 - Oct Sun>=22 1:00u 0 GMT
#
# Use Europe/London for Jersey, Guernsey, and the Isle of Man.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/London -0:01:15 - LMT 1847 Dec 1 0:00s
0:00 GB-Eire %s 1968 Oct 27
1:00 - BST 1971 Oct 31 2:00u
...
...
@@ -561,7 +561,7 @@ Link Europe/London Europe/Isle_of_Man
#Rule Eire 1990 1995 - Oct Sun>=22 1:00u -1:00 -
#Rule Eire 1996 max - Oct lastSun 1:00u -1:00 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
-0:25:21 - DMT 1916 May 21 2:00s
-0:25:21 1:00 IST 1916 Oct 1 2:00s
...
...
@@ -760,7 +760,7 @@ Rule Russia 1996 2010 - Oct lastSun 2:00s 0 -
# These are for backward compatibility with older versions.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone WET 0:00 EU WE%sT
Zone CET 1:00 C-Eur CE%sT
Zone MET 1:00 C-Eur ME%sT
...
...
@@ -820,14 +820,14 @@ Rule Albania 1982 only - Oct 3 0:00 0 -
Rule Albania 1983 only - Apr 18 0:00 1:00 S
Rule Albania 1983 only - Oct 1 0:00 0 -
Rule Albania 1984 only - Apr 1 0:00 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Tirane 1:19:20 - LMT 1914
1:00 - CET 1940 Jun 16
1:00 Albania CE%sT 1984 Jul
1:00 EU CE%sT
# Andorra
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Andorra 0:06:04 - LMT 1901
0:00 - WET 1946 Sep 30
1:00 - CET 1985 Mar 31 2:00
...
...
@@ -844,16 +844,21 @@ Zone Europe/Andorra 0:06:04 - LMT 1901
# Shanks & Pottenger give 02:00, the BEV 00:00. Go with the BEV,
# and guess 02:00 for 1945-04-12.
# From Alois Triendl (2019-07-22):
# In 1946 the end of DST was on Monday, 7 October 1946, at 3:00 am.
# Shanks had this right. Source: Die Weltpresse, 5. Oktober 1946, page 5.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Austria 1920 only - Apr 5 2:00s 1:00 S
Rule Austria 1920 only - Sep 13 2:00s 0 -
Rule Austria 1946 only - Apr 14 2:00s 1:00 S
Rule Austria 1946 1948 - Oct Sun>=1 2:00s 0 -
Rule Austria 1946 only - Oct 7 2:00s 0 -
Rule Austria 1947 1948 - Oct Sun>=1 2:00s 0 -
Rule Austria 1947 only - Apr 6 2:00s 1:00 S
Rule Austria 1948 only - Apr 18 2:00s 1:00 S
Rule Austria 1980 only - Apr 6 0:00 1:00 S
Rule Austria 1980 only - Sep 28 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Vienna 1:05:21 - LMT 1893 Apr
1:00 C-Eur CE%sT 1920
1:00 Austria CE%sT 1940 Apr 1 2:00s
...
...
@@ -885,7 +890,7 @@ Zone Europe/Vienna 1:05:21 - LMT 1893 Apr
# Belarussian government decided against changing to winter time....
# http://eng.belta.by/all_news/society/Belarus-decides-against-adjusting-time-in-Russias-wake_i_76335.html
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Minsk 1:50:16 - LMT 1880
1:50 - MMT 1924 May 2 # Minsk Mean Time
2:00 - EET 1930 Jun 21
...
...
@@ -898,15 +903,35 @@ Zone Europe/Minsk 1:50:16 - LMT 1880
# Belgium
#
# From Paul Eggert (1997-07-02):
# From Michael Deckers (2019-08-25):
# The exposition in the web page
# https://www.bestor.be/wiki/index.php/Voyager_dans_le_temps._L%E2%80%99introduction_de_la_norme_de_Greenwich_en_Belgique
# gives several contemporary sources from which one can conclude that
# the switch in Europe/Brussels on 1892-05-01 was from 00:17:30 to 00:00:00.
#
# From Paul Eggert (2019-08-28):
# This quote helps explain the late-1914 situation:
# In early November 1914, the Germans imposed the time zone used in central
# Europe and forced the inhabitants to set their watches and public clocks
# sixty minutes ahead. Many were reluctant to accept "German time" and
# continued to use "Belgian time" among themselves. Reflecting the spirit of
# resistance that arose in the population, a song made fun of this change....
# The song ended:
# Putting your clock forward
# Will but hasten the happy hour
# When we kick out the Boches!
# See: Pluvinage G. Brussels on German time. Cahiers Bruxellois -
# Brusselse Cahiers. 2014;XLVI(1E):15-38.
# https://www.cairn.info/revue-cahiers-bruxellois-2014-1E-page-15.htm
#
# Entries from 1914 through 1917 are taken from "De tijd in België"
# <https://www.astro.oma.be/GENERAL/INFO/nli001a.html>.
# Entries from 1918 through 1991 are taken from:
# Annuaire de L'Observatoire Royal de Belgique,
# Avenue Circulaire, 3, B-1180 BRUXELLES, CLVIIe année, 1991
# (Imprimerie HAYEZ, s.p.r.l., Rue Fin, 4, 1080 BRUXELLES, MCMXC),
# pp 8-9.
# LMT before 1892 was 0:17:30, according to the official journal of Belgium:
# Moniteur Belge, Samedi 30 Avril 1892, N.121.
# Thanks to Pascal Delmoitie for these references.
# Thanks to Pascal Delmoitie for the 1918/1991 references.
# The 1918 rules are listed for completeness; they apply to unoccupied Belgium.
# Assume Brussels switched to WET in 1918 when the armistice took effect.
#
...
...
@@ -949,9 +974,9 @@ Rule Belgium 1945 only - Apr 2 2:00s 1:00 S
Rule Belgium 1945 only - Sep 16 2:00s 0 -
Rule Belgium 1946 only - May 19 2:00s 1:00 S
Rule Belgium 1946 only - Oct 7 2:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Brussels 0:17:30 - LMT 1880
0:17:30 - BMT 1892 May 1
12:00 # Brussels MT
0:17:30 - BMT 1892 May 1
00:17:30
0:00 - WET 1914 Nov 8
1:00 - CET 1916 May 1 0:00
1:00 C-Eur CE%sT 1918 Nov 11 11:00u
...
...
@@ -976,7 +1001,7 @@ Rule Bulg 1979 only - Oct 1 1:00 0 -
Rule Bulg 1980 1982 - Apr Sat>=1 23:00 1:00 S
Rule Bulg 1980 only - Sep 29 1:00 0 -
Rule Bulg 1981 only - Sep 27 2:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Sofia 1:33:16 - LMT 1880
1:56:56 - IMT 1894 Nov 30 # Istanbul MT?
2:00 - EET 1942 Nov 2 3:00
...
...
@@ -1009,7 +1034,7 @@ Rule Czech 1946 only - May 6 2:00s 1:00 S
Rule Czech 1946 1949 - Oct Sun>=1 2:00s 0 -
Rule Czech 1947 1948 - Apr Sun>=15 2:00s 1:00 S
Rule Czech 1949 only - Apr 9 2:00s 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Prague 0:57:44 - LMT 1850
0:57:44 - PMT 1891 Oct # Prague Mean Time
1:00 C-Eur CE%sT 1945 May 9
...
...
@@ -1071,7 +1096,7 @@ Rule Denmark 1947 only - Aug 10 2:00s 0 -
Rule Denmark 1948 only - May 9 2:00s 1:00 S
Rule Denmark 1948 only - Aug 8 2:00s 0 -
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Copenhagen 0:50:20 - LMT 1890
0:50:20 - CMT 1894 Jan 1 # Copenhagen MT
1:00 Denmark CE%sT 1942 Nov 2 2:00s
...
...
@@ -1168,7 +1193,7 @@ Rule Thule 1993 2006 - Oct lastSun 2:00 0 S
Rule Thule 2007 max - Mar Sun>=8 2:00 1:00 D
Rule Thule 2007 max - Nov Sun>=1 2:00 0 S
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28
-3:00 - -03 1980 Apr 6 2:00
-3:00 EU -03/-02 1996
...
...
@@ -1234,7 +1259,7 @@ Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base
# From Urmet Jänes (2002-03-28):
# The legislative reference is Government decree No. 84 on 2002-02-21.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Tallinn 1:39:00 - LMT 1880
1:39:00 - TMT 1918 Feb # Tallinn Mean Time
1:00 C-Eur CE%sT 1919 Jul
...
...
@@ -1297,7 +1322,7 @@ Rule Finland 1981 1982 - Sep lastSun 3:00 0 -
# Milne says Helsinki (Helsingfors) time was 1:39:49.2 (official document);
# round to nearest.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Helsinki 1:39:49 - LMT 1878 May 31
1:39:49 - HMT 1921 May # Helsinki Mean Time
2:00 Finland EE%sT 1983
...
...
@@ -1387,7 +1412,7 @@ Rule France 1976 only - Sep 26 1:00 0 -
# but Howse quotes the actual French legislation as saying 0:09:21.
# Go with Howse. Howse writes that the time in France was officially based
# on PMT-0:09:21 until 1978-08-09, when the time base finally switched to UTC.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01
0:09:21 - PMT 1911 Mar 11 0:01 # Paris MT
# Shanks & Pottenger give 1940 Jun 14 0:00; go with Excoffier and Le Corre.
...
...
@@ -1435,7 +1460,7 @@ Rule SovietZone 1945 only - May 24 2:00 2:00 M # Midsummer
Rule SovietZone 1945 only - Sep 24 3:00 1:00 S
Rule SovietZone 1945 only - Nov 18 2:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Berlin 0:53:28 - LMT 1893 Apr
1:00 C-Eur CE%sT 1945 May 24 2:00
1:00 SovietZone CE%sT 1946
...
...
@@ -1463,7 +1488,7 @@ Link Europe/Zurich Europe/Busingen
# is in Europe. Our reference location Tbilisi is in the Asian part.
# Gibraltar
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Gibraltar -0:21:24 - LMT 1880 Aug 2 0:00s
0:00 GB-Eire %s 1957 Apr 14 2:00
1:00 - CET 1982
...
...
@@ -1494,7 +1519,7 @@ Rule Greece 1979 only - Apr 1 9:00 1:00 S
Rule Greece 1979 only - Sep 29 2:00 0 -
Rule Greece 1980 only - Apr 1 0:00 1:00 S
Rule Greece 1980 only - Sep 28 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Athens 1:34:52 - LMT 1895 Sep 14
1:34:52 - AMT 1916 Jul 28 0:01 # Athens MT
2:00 Greece EE%sT 1941 Apr 30
...
...
@@ -1531,7 +1556,7 @@ Rule Hungary 1956 only - Sep lastSun 0:00 0 -
Rule Hungary 1957 only - Jun Sun>=1 1:00 1:00 S
Rule Hungary 1957 only - Sep lastSun 3:00 0 -
Rule Hungary 1980 only - Apr 6 1:00 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Budapest 1:16:20 - LMT 1890 Oct
1:00 C-Eur CE%sT 1918
1:00 Hungary CE%sT 1941 Apr 8
...
...
@@ -1592,7 +1617,7 @@ Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 -
Rule Iceland 1949 only - Oct 30 1:00s 0 -
Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 -
Rule Iceland 1967 only - Oct 29 1:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Atlantic/Reykjavik -1:28 - LMT 1908
-1:00 Iceland -01/+00 1968 Apr 7 1:00s
0:00 - GMT
...
...
@@ -1606,6 +1631,25 @@ Zone Atlantic/Reykjavik -1:28 - LMT 1908
# But these events all occurred before the 1970 cutoff,
# so record only the time in Rome.
#
# From Stephen Trainor (2019-05-06):
# http://www.ac-ilsestante.it/MERIDIANE/ora_legale/ORA_LEGALE_ESTIVA_IN_ITALIA.htm
# ... the [1866] law went into effect on 12 December 1866, rather than
# the date of the decree (22 Sep 1866)
# https://web.archive.org/web/20070824155341/http://www.iav.it/planetario/didastro/didastro/english.htm
# ... "In Italy in 1866 there were 6 railway times (Torino, Verona, Firenze,
# Roma, Napoli, Palermo). On that year it was decided to unify them, adopting
# the average time of Rome (even if this city was not yet part of the
# kingdom). On the 12th December 1866, on the starting of the winter time
# table, it took effect in the railways, the post office and the telegraph,
# not only for the internal service but also for the public.... Milano set
# the public watches on the Rome time on the same day (12th December 1866),
# Torino and Bologna on the 1st January 1867, Venezia the 1st May 1880 and the
# last city was Cagliari in 1886."
#
# From Luigi Rosa (2019-05-07):
# this is the scan of the decree:
# http://www.radiomarconi.com/marconi/filopanti/1866c.jpg
#
# From Michael Deckers (2016-10-24):
# http://www.ac-ilsestante.it/MERIDIANE/ora_legale quotes a law of 1893-08-10
# ... [translated as] "The preceding dispositions will enter into
...
...
@@ -1616,6 +1660,7 @@ Zone Atlantic/Reykjavik -1:28 - LMT 1908
# The authoritative source for time in Italy is the national metrological
# institute, which has a summary page of historical DST data at
# http://www.inrim.it/res/tf/ora_legale_i.shtml
# [now at http://oldsite.inrim.it/res/tf/ora_legale_i.shtml as of 2017]
# (2016-10-24):
# http://www.renzobaldini.it/le-ore-legali-in-italia/
# has still different data for 1944. It divides Italy in two, as
...
...
@@ -1630,6 +1675,13 @@ Zone Atlantic/Reykjavik -1:28 - LMT 1908
# advanced to sixty minutes later starting at hour two on 1944-04-02; ...
# Starting at hour three on the date 1944-09-17 standard time will be resumed.
#
# From Alois Triendl (2019-07-02):
# I spent 6 Euros to buy two archive copies of Il Messaggero, a Roman paper,
# for 1 and 2 April 1944. The edition of 2 April has this note: "Tonight at 2
# am, put forward the clock by one hour. Remember that in the night between
# today and Monday the 'ora legale' will come in force again." That makes it
# clear that in Rome the change was on Monday, 3 April 1944 at 2 am.
#
# From Paul Eggert (2016-10-27):
# Go with INRiM for DST rules, except as corrected by Inglis for 1944
# for the Kingdom of Italy. This is consistent with Renzo Baldini.
...
...
@@ -1679,8 +1731,8 @@ Rule Italy 1976 only - May 30 0:00s 1:00 S
Rule Italy 1977 1979 - May Sun>=22 0:00s 1:00 S
Rule Italy 1978 only - Oct 1 0:00s 0 -
Rule Italy 1979 only - Sep 30 0:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
Zone Europe/Rome 0:49:56 - LMT 1866
Sep 2
2
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Rome 0:49:56 - LMT 1866
Dec 1
2
0:49:56 - RMT 1893 Oct 31 23:49:56 # Rome Mean
1:00 Italy CE%sT 1943 Sep 10
1:00 C-Eur CE%sT 1944 Jun 4
...
...
@@ -1755,7 +1807,7 @@ Rule Latvia 1989 1996 - Sep lastSun 2:00s 0 -
# Byalokoz 1919 says Latvia was 1:36:34.
# Go with Byalokoz.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Riga 1:36:34 - LMT 1880
1:36:34 - RMT 1918 Apr 15 2:00 # Riga MT
1:36:34 1:00 LST 1918 Sep 16 3:00 # Latvian ST
...
...
@@ -1777,15 +1829,10 @@ Zone Europe/Riga 1:36:34 - LMT 1880
# From Paul Eggert (2013-09-09):
# Shanks & Pottenger say Vaduz is like Zurich.
# From Alois Treindl (2013-09-18):
# http://www.eliechtensteinensia.li/LIJ/1978/1938-1978/1941.pdf
# ... confirms on p. 6 that Liechtenstein followed Switzerland in 1941 and 1942.
# I ... translate only the last two paragraphs:
# ... during second world war, in the years 1941 and 1942, Liechtenstein
# introduced daylight saving time, adapting to Switzerland. From 1943 on
# central European time was in force throughout the year.
# From a report of the duke's government to the high council,
# regarding the introduction of a time law, of 31 May 1977.
# From Alois Treindl (2019-07-04):
# I was able to access the online archive of the Vaduz paper Vaterland ...
# I could confirm from the paper that Liechtenstein did in fact follow
# the same DST in 1941 and 1942 as Switzerland did.
Link Europe/Zurich Europe/Vaduz
...
...
@@ -1825,7 +1872,7 @@ Link Europe/Zurich Europe/Vaduz
# http://www.lrvk.lt/nut/11/n1749.htm
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Vilnius 1:41:16 - LMT 1880
1:24:00 - WMT 1917 # Warsaw Mean Time
1:35:36 - KMT 1919 Oct 10 # Kaunas Mean Time
...
...
@@ -1869,7 +1916,7 @@ Rule Lux 1926 only - Apr 17 23:00 1:00 S
Rule Lux 1927 only - Apr 9 23:00 1:00 S
Rule Lux 1928 only - Apr 14 23:00 1:00 S
Rule Lux 1929 only - Apr 20 23:00 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun
1:00 Lux CE%sT 1918 Nov 25
0:00 Lux WE%sT 1929 Oct 6 2:00s
...
...
@@ -1894,7 +1941,7 @@ Rule Malta 1974 only - Sep 16 0:00s 0 -
Rule Malta 1975 1979 - Apr Sun>=15 2:00 1:00 S
Rule Malta 1975 1980 - Sep Sun>=15 2:00 0 -
Rule Malta 1980 only - Mar 31 2:00 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 0:00s # Valletta
1:00 Italy CE%sT 1973 Mar 31
1:00 Malta CE%sT 1981
...
...
@@ -1963,7 +2010,7 @@ Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 0:00s # Valletta
Rule Moldova 1997 max - Mar lastSun 2:00 1:00 S
Rule Moldova 1997 max - Oct lastSun 3:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Chisinau 1:55:20 - LMT 1880
1:55 - CMT 1918 Feb 15 # Chisinau MT
1:44:24 - BMT 1931 Jul 24 # Bucharest MT
...
...
@@ -1979,7 +2026,7 @@ Zone Europe/Chisinau 1:55:20 - LMT 1880
# Monaco
# Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
# more precise 0:09:21.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15
0:09:21 - PMT 1911 Mar 11 # Paris Mean Time
0:00 France WE%sT 1945 Sep 16 3:00
...
...
@@ -2054,8 +2101,8 @@ Rule Neth 1945 only - Apr 2 2:00s 1:00 S
Rule Neth 1945 only - Sep 16 2:00s 0 -
#
# Amsterdam Mean Time was +00:19:32.13, but the .13 is omitted
# below because the current format requires
GMT
OFF to be an integer.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# below because the current format requires
STD
OFF to be an integer.
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Amsterdam 0:19:32 - LMT 1835
0:19:32 Neth %s 1937 Jul 1
0:20 Neth +0020/+0120 1940 May 16 0:00
...
...
@@ -2074,7 +2121,7 @@ Rule Norway 1945 only - Oct 1 2:00s 0 -
Rule Norway 1959 1964 - Mar Sun>=15 2:00s 1:00 S
Rule Norway 1959 1965 - Sep Sun>=15 2:00s 0 -
Rule Norway 1965 only - Apr 25 2:00s 1:00 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
1:00 Norway CE%sT 1940 Aug 10 23:00
1:00 C-Eur CE%sT 1945 Apr 2 2:00
...
...
@@ -2165,7 +2212,7 @@ Rule Poland 1959 1961 - Oct Sun>=1 1:00s 0 -
Rule Poland 1960 only - Apr 3 1:00s 1:00 S
Rule Poland 1961 1964 - May lastSun 1:00s 1:00 S
Rule Poland 1962 1964 - Sep lastSun 1:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Warsaw 1:24:00 - LMT 1880
1:24:00 - WMT 1915 Aug 5 # Warsaw Mean Time
1:00 C-Eur CE%sT 1918 Sep 16 3:00
...
...
@@ -2270,7 +2317,7 @@ Rule Port 1980 only - Mar lastSun 0:00s 1:00 S
Rule Port 1981 1982 - Mar lastSun 1:00s 1:00 S
Rule Port 1983 only - Mar lastSun 2:00s 1:00 S
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Lisbon -0:36:45 - LMT 1884
-0:36:45 - LMT 1912 Jan 1 0:00u # Lisbon MT
0:00 Port WE%sT 1966 Apr 3 2:00
...
...
@@ -2329,7 +2376,7 @@ Rule Romania 1980 only - Apr 5 23:00 1:00 S
Rule Romania 1980 only - Sep lastSun 1:00 0 -
Rule Romania 1991 1993 - Mar lastSun 0:00s 1:00 S
Rule Romania 1991 1993 - Sep lastSun 0:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
1:44:24 - BMT 1931 Jul 24 # Bucharest MT
2:00 Romania EE%sT 1981 Mar 29 2:00s
...
...
@@ -2493,6 +2540,12 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
# Europe/Kaliningrad covers...
# 39 RU-KGD Kaliningrad Oblast
# From Paul Eggert (2019-07-25):
# Although Shanks lists 1945-01-01 as the date for transition from
# +01/+02 to +02/+03, more likely this is a placeholder. Guess that
# the transition occurred at 1945-04-10 00:00, which is about when
# Königsberg surrendered to Soviet troops. (Thanks to Alois Triendl.)
# From Paul Eggert (2016-03-18):
# The 1989 transition is from USSR act No. 227 (1989-03-14).
...
...
@@ -2509,8 +2562,8 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
# Moscow on 1991-11-03, switched to Moscow-1 on 1992-01-19.
Zone Europe/Kaliningrad 1:22:00 - LMT 1893 Apr
1:00 C-Eur CE%sT 1945
2:00 Poland
CE%sT 1946
1:00 C-Eur CE%sT 1945
Apr 10
2:00 Poland
EE%sT 1946 Apr 7
3:00 Russia MSK/MSD 1989 Mar 26 2:00s
2:00 Russia EE%sT 2011 Mar 27 2:00s
3:00 - +03 2014 Oct 26 2:00s
...
...
@@ -3368,7 +3421,7 @@ Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2
# See Europe/Rome.
# Serbia
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Belgrade 1:22:00 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945
...
...
@@ -3474,7 +3527,7 @@ Rule SpainAfrica 1976 only - Aug 1 0:00 0 -
Rule SpainAfrica 1977 only - Sep 28 0:00 0 -
Rule SpainAfrica 1978 only - Jun 1 0:00 1:00 S
Rule SpainAfrica 1978 only - Aug 4 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Madrid -0:14:44 - LMT 1900 Dec 31 23:45:16
0:00 Spain WE%sT 1940 Mar 16 23:00
1:00 Spain CE%sT 1979
...
...
@@ -3542,7 +3595,7 @@ Zone Atlantic/Canary -1:01:36 - LMT 1922 Mar # Las Palmas de Gran C.
#
# Source: The newspaper "Dagens Nyheter", 1916-10-01, page 7 upper left.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Stockholm 1:12:12 - LMT 1879 Jan 1
1:00:14 - SET 1900 Jan 1 # Swedish Time
1:00 - CET 1916 May 14 23:00
...
...
@@ -3645,7 +3698,7 @@ Zone Europe/Stockholm 1:12:12 - LMT 1879 Jan 1
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S
Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
0:29:46 - BMT 1894 Jun # Bern Mean Time
1:00 Swiss CE%sT 1981
...
...
@@ -3653,20 +3706,75 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
# Turkey
# From Alois Treindl (2019-08-12):
# http://www.astrolojidergisi.com/yazsaati.htm has researched the time zone
# history of Turkey, based on newspaper archives and official documents.
# From Paul Eggert (2019-08-28):
# That source (Oya Vulaş, "Türkiye'de Yaz Saati Uygulamaları")
# is used for 1940/1972, where it seems more reliable than our other
# sources.
# From Kıvanç Yazan (2019-08-12):
# http://www.resmigazete.gov.tr/arsiv/14539.pdf#page=24
# 1973-06-03 01:00 -> 02:00, 1973-11-04 02:00 -> 01:00
#
# http://www.resmigazete.gov.tr/arsiv/14829.pdf#page=1
# 1974-03-31 02:00 -> 03:00, 1974-11-03 02:00 -> 01:00
#
# http://www.resmigazete.gov.tr/arsiv/15161.pdf#page=1
# 1975-03-22 02:00 -> 03:00, 1975-11-02 02:00 -> 01:00
#
# http://www.resmigazete.gov.tr/arsiv/15535_1.pdf#page=1
# 1976-03-21 02:00 -> 03:00, 1976-10-31 02:00 -> 01:00
#
# http://www.resmigazete.gov.tr/arsiv/15778.pdf#page=5
# 1977-04-03 02:00 -> 03:00, 1977-10-16 02:00 -> 01:00,
# 1978-04-02 02:00 -> 03:00 (not applied, see below)
# 1978-10-15 02:00 -> 01:00 (not applied, see below)
# 1979-04-01 02:00 -> 03:00 (not applied, see below)
# 1979-10-14 02:00 -> 01:00 (not applied, see below)
#
# http://www.resmigazete.gov.tr/arsiv/16245.pdf#page=17
# This cancels the previous decision, and repeats it only for 1978.
# 1978-04-02 02:00 -> 03:00, 1978-10-15 02:00 -> 01:00
# (not applied due to standard TZ change below)
#
# http://www.resmigazete.gov.tr/arsiv/16331.pdf#page=3
# This decision changes the default longitude for Turkish time zone from 30
# degrees East to 45 degrees East. This means a standard TZ change, from +2
# to +3. This is published & applied on 1978-06-29. At that time, Turkey was
# already on summer time (already on 45E). Hence, this new law just meant an
# "continuous summer time". Note that this was reversed in a few years.
#
# http://www.resmigazete.gov.tr/arsiv/18119_1.pdf#page=1
# 1983-07-31 02:00 -> 03:00 (note that this jumps TZ to +4)
# 1983-10-02 02:00 -> 01:00 (back to +3)
#
# http://www.resmigazete.gov.tr/arsiv/18561.pdf (page 1 and 34)
# At this time, Turkey is still on +3 with no spring-forward on early
# 1984. This decision is published on 10/31/1984. Page 1 declares
# the decision of reverting the "default longitude change". So the
# standard time should go back to +3 (30E). And page 34 explains when
# that will happen: 1984-11-01 02:00 -> 01:00. You can think of this
# as "end of continuous summer time, change of standard time zone".
#
# http://www.resmigazete.gov.tr/arsiv/18713.pdf#page=1
# 1985-04-20 01:00 -> 02:00, 1985-09-28 02:00 -> 01:00
# From Kıvanç Yazan (2016-09-25):
# 1) For 1986-2006, DST started at 01:00 local and ended at 02:00 local, with
# no exceptions.
# 2) 1994's lastSun was overridden with Mar 20 ...
# Here are official papers:
# http://www.resmigazete.gov.tr/arsiv/19032.pdf
- page
2 for 1986
# http://www.resmigazete.gov.tr/arsiv/19400.pdf
- page
4 for 1987
# http://www.resmigazete.gov.tr/arsiv/19752.pdf
- page
15 for 1988
# http://www.resmigazete.gov.tr/arsiv/20102.pdf
- page
6 for 1989
# http://www.resmigazete.gov.tr/arsiv/20464.pdf
- page
1 for 1990 - 1992
# http://www.resmigazete.gov.tr/arsiv/21531.pdf
- page
15 for 1993 - 1995
# http://www.resmigazete.gov.tr/arsiv/21879.pdf
- page
1 for overriding 1994
# http://www.resmigazete.gov.tr/arsiv/22588.pdf
- page
1 for 1996, 1997
# http://www.resmigazete.gov.tr/arsiv/23286.pdf
- page
10 for 1998 - 2000
# http://www.resmigazete.gov.tr/arsiv/19032.pdf
#page=
2 for 1986
# http://www.resmigazete.gov.tr/arsiv/19400.pdf
#page=
4 for 1987
# http://www.resmigazete.gov.tr/arsiv/19752.pdf
#page=
15 for 1988
# http://www.resmigazete.gov.tr/arsiv/20102.pdf
#page=
6 for 1989
# http://www.resmigazete.gov.tr/arsiv/20464.pdf
#page=
1 for 1990 - 1992
# http://www.resmigazete.gov.tr/arsiv/21531.pdf
#page=
15 for 1993 - 1995
# http://www.resmigazete.gov.tr/arsiv/21879.pdf
#page=
1 for overriding 1994
# http://www.resmigazete.gov.tr/arsiv/22588.pdf
#page=
1 for 1996, 1997
# http://www.resmigazete.gov.tr/arsiv/23286.pdf
#page=
10 for 1998 - 2000
# http://www.resmigazete.gov.tr/eskiler/2001/03/20010324.htm#2 - for 2001
# http://www.resmigazete.gov.tr/eskiler/2002/03/20020316.htm#2 - for 2002-2006
# From Paul Eggert (2016-09-25):
...
...
@@ -3750,56 +3858,46 @@ Rule Turkey 1922 only - Oct 8 0:00 0 -
Rule Turkey 1924 only - May 13 0:00 1:00 S
Rule Turkey 1924 1925 - Oct 1 0:00 0 -
Rule Turkey 1925 only - May 1 0:00 1:00 S
Rule Turkey 1940 only - Ju
n 30
0:00 1:00 S
Rule Turkey 1940 only - Oct
5
0:00 0 -
Rule Turkey 1940 only - Ju
l 1
0:00 1:00 S
Rule Turkey 1940 only - Oct
6
0:00 0 -
Rule Turkey 1940 only - Dec 1 0:00 1:00 S
Rule Turkey 1941 only - Sep 21 0:00 0 -
Rule Turkey 1942 only - Apr 1 0:00 1:00 S
# Whitman omits the next two transition and gives 1945 Oct 1;
# go with Shanks & Pottenger.
Rule Turkey 1942 only - Nov 1 0:00 0 -
Rule Turkey 1945 only - Apr 2 0:00 1:00 S
Rule Turkey 1945 only - Oct 8 0:00 0 -
Rule Turkey 1946 only - Jun 1 0:00 1:00 S
Rule Turkey 1946 only - Oct 1 0:00 0 -
Rule Turkey 1947 1948 - Apr Sun>=16 0:00 1:00 S
Rule Turkey 1947 195
0
- Oct Sun>=2 0:00 0 -
Rule Turkey 1947 195
1
- Oct Sun>=2 0:00 0 -
Rule Turkey 1949 only - Apr 10 0:00 1:00 S
Rule Turkey 1950 only - Apr 1
9
0:00 1:00 S
Rule Turkey 1950 only - Apr 1
6
0:00 1:00 S
Rule Turkey 1951 only - Apr 22 0:00 1:00 S
Rule Turkey 1951 only - Oct 8 0:00 0 -
# DST for 15 months; unusual but we'll let it pass.
Rule Turkey 1962 only - Jul 15 0:00 1:00 S
Rule Turkey 196
2 only - Oct 8
0:00 0 -
Rule Turkey 196
3 only - Oct 30
0:00 0 -
Rule Turkey 1964 only - May 15 0:00 1:00 S
Rule Turkey 1964 only - Oct 1 0:00 0 -
Rule Turkey 1970 1972 - May Sun>=2 0:00 1:00 S
Rule Turkey 1970 1972 - Oct Sun>=2 0:00 0 -
Rule Turkey 1973 only - Jun 3 1:00 1:00 S
Rule Turkey 1973
only - Nov 4 3
:00 0 -
Rule Turkey 1973
1976 - Oct Sun>=31 2
:00 0 -
Rule Turkey 1974 only - Mar 31 2:00 1:00 S
Rule Turkey 1974 only - Nov 3 5:00 0 -
Rule Turkey 1975 only - Mar 30 0:00 1:00 S
Rule Turkey 1975 1976 - Oct lastSun 0:00 0 -
Rule Turkey 1976 only - Jun 1 0:00 1:00 S
Rule Turkey 1977 1978 - Apr Sun>=1 0:00 1:00 S
Rule Turkey 1977 only - Oct 16 0:00 0 -
Rule Turkey 1979 1980 - Apr Sun>=1 3:00 1:00 S
Rule Turkey 1979 1982 - Oct Mon>=11 0:00 0 -
Rule Turkey 1981 1982 - Mar lastSun 3:00 1:00 S
Rule Turkey 1983 only - Jul 31 0:00 1:00 S
Rule Turkey 1983 only - Oct 2 0:00 0 -
Rule Turkey 1985 only - Apr 20 0:00 1:00 S
Rule Turkey 1985 only - Sep 28 0:00 0 -
Rule Turkey 1975 only - Mar 22 2:00 1:00 S
Rule Turkey 1976 only - Mar 21 2:00 1:00 S
Rule Turkey 1977 1978 - Apr Sun>=1 2:00 1:00 S
Rule Turkey 1977 1978 - Oct Sun>=15 2:00 0 -
Rule Turkey 1978 only - Jun 29 0:00 0 -
Rule Turkey 1983 only - Jul 31 2:00 1:00 S
Rule Turkey 1983 only - Oct 2 2:00 0 -
Rule Turkey 1985 only - Apr 20 1:00s 1:00 S
Rule Turkey 1985 only - Sep 28 1:00s 0 -
Rule Turkey 1986 1993 - Mar lastSun 1:00s 1:00 S
Rule Turkey 1986 1995 - Sep lastSun 1:00s 0 -
Rule Turkey 1994 only - Mar 20 1:00s 1:00 S
Rule Turkey 1995 2006 - Mar lastSun 1:00s 1:00 S
Rule Turkey 1996 2006 - Oct lastSun 1:00s 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Europe/Istanbul 1:55:52 - LMT 1880
1:56:56 - IMT 1910 Oct # Istanbul Mean Time?
2:00 Turkey EE%sT 1978
Oct 15
3:00 Turkey +03/+04 198
5 Apr 2
0
2:00 Turkey EE%sT 1978
Jun 29
3:00 Turkey +03/+04 198
4 Nov 1 2:0
0
2:00 Turkey EE%sT 2007
2:00 EU EE%sT 2011 Mar 27 1:00u
2:00 - EET 2011 Mar 28 1:00u
...
...
@@ -3892,16 +3990,8 @@ Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
# controversial, and some day "Kyiv" may become substantially more popular in
# English; in the meantime, stick with the traditional English "Kiev" as that
# means less disruption for our users.
#
# Anyway, none of the common English-language spellings (Kiev, Kyiv, Kieff,
# Kijeff, Kijev, Kiyef, Kiyeff) do justice to the common pronunciation in
# Ukrainian, namely [ˈkɪjiu̯] (IPA). This pronunciation has nothing like an
# English "v" or "f", and instead trails off with what an English-speaker
# would call a demure "oo" sound, and it would would be better anglicized as
# "Kuiyu". Here's a sound file, if you would like to do as the Kuiyuvians do:
# https://commons.wikimedia.org/wiki/File:Uk-Київ.ogg
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
# This represents most of Ukraine. See above for the spelling of "Kiev".
Zone Europe/Kiev 2:02:04 - LMT 1880
2:02:04 - KMT 1924 May 2 # Kiev Mean Time
...
...
make/data/tzdata/factory
浏览文件 @
a495795c
...
...
@@ -31,5 +31,5 @@
# time zone abbreviation "-00", indicating that the actual time zone
# is unknown.
# Zone NAME
GMT
OFF RULES FORMAT
# Zone NAME
STD
OFF RULES FORMAT
Zone Factory 0 - -00
make/data/tzdata/leapseconds
浏览文件 @
a495795c
...
...
@@ -26,36 +26,39 @@
# This file is in the public domain.
# This file is generated automatically from the data in the public-domain
# leap-seconds.list file, which can be copied from
#
NIST format
leap-seconds.list file, which can be copied from
# <ftp://ftp.nist.gov/pub/time/leap-seconds.list>
# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>
# or <ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.list>.
# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>.
# For more about leap-seconds.list, please see
# The NTP Timescale and Leap Seconds
# <https://www.eecis.udel.edu/~mills/leap.html>.
# The International Earth Rotation and Reference Systems Service
# The rules for leap seconds are specified in Annex 1 (Time scales) of:
# Standard-frequency and time-signal emissions.
# International Telecommunication Union - Radiocommunication Sector
# (ITU-R) Recommendation TF.460-6 (02/2002)
# <https://www.itu.int/rec/R-REC-TF.460-6-200202-I/>.
# The International Earth Rotation and Reference Systems Service (IERS)
# periodically uses leap seconds to keep UTC to within 0.9 s of UT1
# (
which measures the true angular orientation of the earth in space
)
# (
a proxy for Earth's angle in space as measured by astronomers
)
# and publishes leap second data in a copyrighted file
# <https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat>.
# See: Levine J. Coordinated Universal Time and the leap second.
# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
# <https://ieeexplore.ieee.org/document/7909995>.
# There were no leap seconds before 1972,
because the
official mechanism
# account
ing for the discrepancy between atomic time and the earth's rotation
#
did not exist
. The first ("1 Jan 1972") data line in leap-seconds.list
# There were no leap seconds before 1972,
as no
official mechanism
# account
ed for the discrepancy between atomic time (TAI) and the earth's
#
rotation
. The first ("1 Jan 1972") data line in leap-seconds.list
# does not denote a leap second; it denotes the start of the current definition
# of UTC.
# The correction (+ or -) is made at the given time, so lines
# will typically look like:
# Leap YEAR MON DAY 23:59:60 + R/S
# or
# Leap YEAR MON DAY 23:59:59 - R/S
# If the leap second is Rolling (R) the given time is local time (unused here).
# All leap-seconds are Stationary (S) at the given UTC time.
# The correction (+ or -) is made at the given time, so in the unlikely
# event of a negative leap second, a line would look like this:
# Leap YEAR MON DAY 23:59:59 - S
# Typical lines look like this:
# Leap YEAR MON DAY 23:59:60 + S
Leap 1972 Jun 30 23:59:60 + S
Leap 1972 Dec 31 23:59:60 + S
Leap 1973 Dec 31 23:59:60 + S
...
...
@@ -85,8 +88,8 @@ Leap 2015 Jun 30 23:59:60 + S
Leap 2016 Dec 31 23:59:60 + S
# POSIX timestamps for the data in this file:
#updated 1467936000
#expires 15
77491200
#updated 1467936000
(2016-07-08 00:00:00 UTC)
#expires 15
93302400 (2020-06-28 00:00:00 UTC)
# Updated through IERS Bulletin C5
7
# File expires on: 28
December 2019
# Updated through IERS Bulletin C5
8
# File expires on: 28
June 2020
make/data/tzdata/northamerica
浏览文件 @
a495795c
...
...
@@ -116,10 +116,33 @@
# was the first nationwide legal time standard, and apparently
# time was just called "Standard Time" or "Daylight Saving Time".
# From Arthur David Olson:
# US Daylight Saving Time ended on the last Sunday of *October* in 1974.
# See, for example, the front page of the Saturday, 1974-10-26
# and Sunday, 1974-10-27 editions of the Washington Post.
# From Paul Eggert (2019-06-04):
# Here is the legal basis for the US federal rules.
# * Public Law 65-106 (1918-03-19) implemented standard and daylight saving
# time for the first time across the US, springing forward on March's last
# Sunday and falling back on October's last Sunday.
# https://www.loc.gov/law/help/statutes-at-large/65th-congress/session-2/c65s2ch24.pdf
# * Public Law 66-40 (1919-08-20) repealed DST on October 1919's last Sunday.
# https://www.loc.gov/law/help/statutes-at-large/66th-congress/session-1/c66s1ch51.pdf
# * Public Law 77-403 (1942-01-20) started wartime DST on 1942-02-09.
# https://www.loc.gov/law/help/statutes-at-large/77th-congress/session-2/c77s2ch7.pdf
# * Public Law 79-187 (1945-09-25) ended wartime DST on 1945-09-30.
# https://www.loc.gov/law/help/statutes-at-large/79th-congress/session-1/c79s1ch388.pdf
# * Public Law 89-387 (1966-04-13) reinstituted a national standard for DST,
# from April's last Sunday to October's last Sunday, effective 1967.
# https://www.govinfo.gov/content/pkg/STATUTE-80/pdf/STATUTE-80-Pg107.pdf
# * Public Law 93-182 (1973-12-15) moved the 1974 spring-forward to 01-06.
# https://www.govinfo.gov/content/pkg/STATUTE-87/pdf/STATUTE-87-Pg707.pdf
# * Public Law 93-434 (1974-10-05) moved the 1975 spring-forward to
# February's last Sunday.
# https://www.govinfo.gov/content/pkg/STATUTE-88/pdf/STATUTE-88-Pg1209.pdf
# * Public Law 99-359 (1986-07-08) moved the spring-forward to April's first
# Sunday.
# https://www.govinfo.gov/content/pkg/STATUTE-100/pdf/STATUTE-100-Pg764.pdf
# * Public Law 109-58 (2005-08-08), effective 2007, moved the spring-forward
# to March's second Sunday and the fall-back to November's first Sunday.
# https://www.govinfo.gov/content/pkg/PLAW-109publ58/pdf/PLAW-109publ58.pdf
# All transitions are at 02:00 local time.
# From Arthur David Olson:
# Before the Uniform Time Act of 1966 took effect in 1967, observance of
...
...
@@ -175,11 +198,11 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:00 D
Rule US 1918 1919 - Oct lastSun 2:00 0 S
Rule US 1942 only - Feb 9 2:00 1:00 W # War
Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace
Rule US 1945 only - Sep
lastSun
2:00 0 S
Rule US 1945 only - Sep
30
2:00 0 S
Rule US 1967 2006 - Oct lastSun 2:00 0 S
Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
Rule US 1974 only - Jan 6 2:00 1:00 D
Rule US 1975 only - Feb
23
2:00 1:00 D
Rule US 1975 only - Feb
lastSun
2:00 1:00 D
Rule US 1976 1986 - Apr lastSun 2:00 1:00 D
Rule US 1987 2006 - Apr Sun>=1 2:00 1:00 D
Rule US 2007 max - Mar Sun>=8 2:00 1:00 D
...
...
@@ -196,7 +219,7 @@ Rule US 2007 max - Nov Sun>=1 2:00 0 S
# increase the chances that they'll actually get compiled and to
# avoid the need to duplicate the US rules in another file.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone EST -5:00 - EST
Zone MST -7:00 - MST
Zone HST -10:00 - HST
...
...
@@ -353,7 +376,7 @@ Rule NYC 1920 only - Oct lastSun 2:00 0 S
Rule NYC 1921 1966 - Apr lastSun 2:00 1:00 D
Rule NYC 1921 1954 - Sep lastSun 2:00 0 S
Rule NYC 1955 1966 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
-5:00 US E%sT 1920
-5:00 NYC E%sT 1942
...
...
@@ -406,6 +429,31 @@ Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
# From Paul Eggert (2015-12-25):
# Assume this practice predates 1970, so Fort Pierre can use America/Chicago.
# From Paul Eggert (2015-04-06):
# In 1950s Nashville a public clock had dueling faces, one for conservatives
# and the other for liberals; the two sides didn't agree about the time of day.
# I haven't found a photo of this clock, nor have I tracked down the TIME
# magazine report cited below, but here's the story as told by the late
# American journalist John Seigenthaler, who was there:
#
# "The two [newspaper] owners held strongly contrasting political and
# ideological views. Evans was a New South liberal, Stahlman an Old South
# conservative, and their two papers frequently clashed editorially, often on
# the same day.... In the 1950s as the state legislature was grappling with
# the question of whether to approve daylight saving time for the entire state,
# TIME magazine reported:
#
# "'The Nashville Banner and The Nashville Tennessean rarely agree on anything
# but the time of day - and last week they couldn't agree on that.'
#
# "It was all too true. The clock on the front of the building had two faces -
# The Tennessean side of the building facing west, the other, east. When it
# was high noon Banner time, it was 11 a.m. Tennessean time."
#
# Seigenthaler J. For 100 years, Tennessean had it covered.
# The Tennessean 2007-05-11, republished 2015-04-06.
# https://www.tennessean.com/story/insider/extras/2015/04/06/archives-seigenthaler-for-100-years-the-tennessean-had-it-covered/25348545/
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Chicago 1920 only - Jun 13 2:00 1:00 D
Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S
...
...
@@ -413,7 +461,7 @@ Rule Chicago 1921 only - Mar lastSun 2:00 1:00 D
Rule Chicago 1922 1966 - Apr lastSun 2:00 1:00 D
Rule Chicago 1922 1954 - Sep lastSun 2:00 0 S
Rule Chicago 1955 1966 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
-6:00 US C%sT 1920
-6:00 Chicago C%sT 1936 Mar 1 2:00
...
...
@@ -481,7 +529,7 @@ Rule Denver 1920 only - Oct lastSun 2:00 0 S
Rule Denver 1921 only - May 22 2:00 0 S
Rule Denver 1965 1966 - Apr lastSun 2:00 1:00 D
Rule Denver 1965 1966 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Denver -6:59:56 - LMT 1883 Nov 18 12:00:04
-7:00 US M%sT 1920
-7:00 Denver M%sT 1942
...
...
@@ -534,7 +582,7 @@ Rule CA 1949 only - Jan 1 2:00 0 S
Rule CA 1950 1966 - Apr lastSun 1:00 1:00 D
Rule CA 1950 1961 - Sep lastSun 2:00 0 S
Rule CA 1962 1966 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02
-8:00 US P%sT 1946
-8:00 CA P%sT 1967
...
...
@@ -642,7 +690,7 @@ Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02
# So they won't be waiting for Alaska to join them on 2019-03-10, but will
# rather change their clocks twice in seven weeks.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Juneau 15:02:19 - LMT 1867 Oct 19 15:33:32
-8:57:41 - LMT 1900 Aug 20 12:00
-8:00 - PST 1942
...
...
@@ -762,7 +810,7 @@ Zone America/Adak 12:13:22 - LMT 1867 Oct 19 12:44:35
# Note that 1933-05-21 was a Sunday.
# We're left to guess the time of day when Act 163 was approved; guess noon.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
-10:30 - HST 1933 Apr 30 2:00
-10:30 1:00 HDT 1933 May 21 12:00
...
...
@@ -792,7 +840,7 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
# Shanks says the 1944 experiment came to an end on 1944-03-17.
# Go with the Arizona State Library instead.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Phoenix -7:28:18 - LMT 1883 Nov 18 11:31:42
-7:00 US M%sT 1944 Jan 1 0:01
-7:00 - MST 1944 Apr 1 0:01
...
...
@@ -818,7 +866,7 @@ Zone America/Phoenix -7:28:18 - LMT 1883 Nov 18 11:31:42
# quarter of Idaho county) and eastern Oregon (most of Malheur County)
# switched four weeks late in 1974.
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:15:11
-8:00 US P%sT 1923 May 13 2:00
-7:00 US M%sT 1974
...
...
@@ -890,7 +938,7 @@ Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:15:11
Rule Indianapolis 1941 only - Jun 22 2:00 1:00 D
Rule Indianapolis 1941 1954 - Sep lastSun 2:00 0 S
Rule Indianapolis 1946 1954 - Apr lastSun 2:00 1:00 D
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Indiana/Indianapolis -5:44:38 - LMT 1883 Nov 18 12:15:22
-6:00 US C%sT 1920
-6:00 Indianapolis C%sT 1942
...
...
@@ -910,7 +958,7 @@ Rule Marengo 1951 only - Apr lastSun 2:00 1:00 D
Rule Marengo 1951 only - Sep lastSun 2:00 0 S
Rule Marengo 1954 1960 - Apr lastSun 2:00 1:00 D
Rule Marengo 1954 1960 - Sep lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Indiana/Marengo -5:45:23 - LMT 1883 Nov 18 12:14:37
-6:00 US C%sT 1951
-6:00 Marengo C%sT 1961 Apr 30 2:00
...
...
@@ -934,7 +982,7 @@ Rule Vincennes 1956 1963 - Apr lastSun 2:00 1:00 D
Rule Vincennes 1960 only - Oct lastSun 2:00 0 S
Rule Vincennes 1961 only - Sep lastSun 2:00 0 S
Rule Vincennes 1962 1963 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Indiana/Vincennes -5:50:07 - LMT 1883 Nov 18 12:09:53
-6:00 US C%sT 1946
-6:00 Vincennes C%sT 1964 Apr 26 2:00
...
...
@@ -945,21 +993,21 @@ Zone America/Indiana/Vincennes -5:50:07 - LMT 1883 Nov 18 12:09:53
-5:00 US E%sT
#
# Perry County, Indiana, switched from eastern to central time in April 2006.
# From Alois Triendl (2019-07-09):
# The Indianapolis News, Friday 27 October 1967 states that Perry County
# returned to CST. It went again to EST on 27 April 1969, as documented by the
# Indianapolis star of Saturday 26 April.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Perry 1946 only - Apr lastSun 2:00 1:00 D
Rule Perry 1946 only - Sep lastSun 2:00 0 S
Rule Perry 1953 1954 - Apr lastSun 2:00 1:00 D
Rule Perry 1953 1959 - Sep lastSun 2:00 0 S
Rule Perry 1955 only - May 1 0:00 1:00 D
Rule Perry 1955 1960 - Sep lastSun 2:00 0 S
Rule Perry 1956 1963 - Apr lastSun 2:00 1:00 D
Rule Perry 1960 only - Oct lastSun 2:00 0 S
Rule Perry 1961 only - Sep lastSun 2:00 0 S
Rule Perry 1962 1963 - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Rule Perry 1961 1963 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Indiana/Tell_City -5:47:03 - LMT 1883 Nov 18 12:12:57
-6:00 US C%sT 1946
-6:00 Perry C%sT 1964 Apr 26 2:00
-5:00 - EST 1969
-5:00 - EST 1967 Oct 29 2:00
-6:00 US C%sT 1969 Apr 27 2:00
-5:00 US E%sT 1971
-5:00 - EST 2006 Apr 2 2:00
-6:00 US C%sT
...
...
@@ -971,7 +1019,7 @@ Rule Pike 1955 only - May 1 0:00 1:00 D
Rule Pike 1955 1960 - Sep lastSun 2:00 0 S
Rule Pike 1956 1964 - Apr lastSun 2:00 1:00 D
Rule Pike 1961 1964 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Indiana/Petersburg -5:49:07 - LMT 1883 Nov 18 12:10:53
-6:00 US C%sT 1955
-6:00 Pike C%sT 1965 Apr 25 2:00
...
...
@@ -993,7 +1041,7 @@ Rule Starke 1947 1954 - Sep lastSun 2:00 0 S
Rule Starke 1955 1956 - Oct lastSun 2:00 0 S
Rule Starke 1957 1958 - Sep lastSun 2:00 0 S
Rule Starke 1959 1961 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Indiana/Knox -5:46:30 - LMT 1883 Nov 18 12:13:30
-6:00 US C%sT 1947
-6:00 Starke C%sT 1962 Apr 29 2:00
...
...
@@ -1009,7 +1057,7 @@ Rule Pulaski 1946 1960 - Apr lastSun 2:00 1:00 D
Rule Pulaski 1946 1954 - Sep lastSun 2:00 0 S
Rule Pulaski 1955 1956 - Oct lastSun 2:00 0 S
Rule Pulaski 1957 1960 - Sep lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Indiana/Winamac -5:46:25 - LMT 1883 Nov 18 12:13:35
-6:00 US C%sT 1946
-6:00 Pulaski C%sT 1961 Apr 30 2:00
...
...
@@ -1020,7 +1068,7 @@ Zone America/Indiana/Winamac -5:46:25 - LMT 1883 Nov 18 12:13:35
-5:00 US E%sT
#
# Switzerland County, Indiana, did not observe DST from 1973 through 2005.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 12:19:44
-6:00 US C%sT 1954 Apr 25 2:00
-5:00 - EST 1969
...
...
@@ -1035,17 +1083,28 @@ Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 12:19:44
# clear how this matched civil time in Louisville, so for now continue
# to assume Louisville switched at noon new local time, like New York.
#
# From Michael Deckers (2019-08-06):
# From the contemporary source given by Alois Treindl,
# the switch in Louisville on 1946-04-28 was on 00:01
# From Paul Eggert (2019-08-26):
# That source was the Louisville Courier-Journal, 1946-04-27, p 4.
# Shanks gives 02:00 for all 20th-century transition times in Louisville.
# Evidently this is wrong for spring 1946. Although also likely wrong
# for other dates, we have no data.
#
# Part of Kentucky left its clocks alone in 1974.
# This also includes Clark, Floyd, and Harrison counties in Indiana.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Louisville 1921 only - May 1 2:00 1:00 D
Rule Louisville 1921 only - Sep 1 2:00 0 S
Rule Louisville 1941
1961
- Apr lastSun 2:00 1:00 D
Rule Louisville 1941
only
- Apr lastSun 2:00 1:00 D
Rule Louisville 1941 only - Sep lastSun 2:00 0 S
Rule Louisville 1946 only - Apr lastSun 0:01 1:00 D
Rule Louisville 1946 only - Jun 2 2:00 0 S
Rule Louisville 1950 1961 - Apr lastSun 2:00 1:00 D
Rule Louisville 1950 1955 - Sep lastSun 2:00 0 S
Rule Louisville 1956 196
0
- Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
Rule Louisville 1956 196
1
- Oct lastSun 2:00 0 S
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Kentucky/Louisville -5:43:02 - LMT 1883 Nov 18 12:16:58
-6:00 US C%sT 1921
-6:00 Louisville C%sT 1942
...
...
@@ -1134,29 +1193,32 @@ Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:20:36
# one hour in 1914." This change is not in Shanks. We have no more
# info, so omit this for now.
#
# From Paul Eggert (2017-07-26):
# Although Shanks says Detroit observed DST in 1967 from 06-14 00:01
# until 10-29 00:01, I now see multiple reports that this is incorrect.
# For example, according to a 50-year anniversary report about the 1967
# Detroit riots and a major-league doubleheader on 1967-07-23, "By the time
# the last fly ball of the doubleheader settled into the glove of leftfielder
# Lenny Green, it was after 7 p.m. Detroit did not observe daylight saving
# time, so light was already starting to fail. Twilight was made even deeper
# by billowing columns of smoke that ascended in an unbroken wall north of the
# ballpark." See: Dow B. Detroit '67: As violence unfolded, Tigers played two
# at home vs. Yankees. Detroit Free Press 2017-07-23.
# https://www.freep.com/story/sports/mlb/tigers/2017/07/23/detroit-tigers-1967-riot-new-york-yankees/499951001/
# From Paul Eggert (2019-07-06):
# Due to a complicated set of legal maneuvers, in 1967 Michigan did
# not start daylight saving time when the rest of the US did.
# Instead, it began DST on Jun 14 at 00:01. This was big news:
# the Detroit Free Press reported it at the top of Page 1 on
# 1967-06-14, in an article "State Adjusting to Switch to Fast Time"
# by Gary Blonston, above an article about Thurgood Marshall's
# confirmation to the US Supreme Court. Although Shanks says Detroit
# observed DST until 1967-10-29 00:01, that time of day seems to be
# incorrect, as the Free Press later said DST ended in Michigan at the
# same time as the rest of the US. Also, although Shanks reports no DST in
# Detroit in 1968, it did observe DST that year; in the November 1968
# election Michigan voters narrowly repealed DST, effective 1969.
#
# Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Detroit 1948 only - Apr lastSun 2:00 1:00 D
Rule Detroit 1948 only - Sep lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Detroit -5:32:11 - LMT 1905
-6:00 - CST 1915 May 15 2:00
-5:00 - EST 1942
-5:00 US E%sT 1946
-5:00 Detroit E%sT 1973
-5:00 Detroit E%sT 1967 Jun 14 0:01
-5:00 US E%sT 1969
-5:00 - EST 1973
-5:00 US E%sT 1975
-5:00 - EST 1975 Apr 27 2:00
-5:00 US E%sT
...
...
@@ -1168,7 +1230,7 @@ Rule Menominee 1946 only - Apr lastSun 2:00 1:00 D
Rule Menominee 1946 only - Sep lastSun 2:00 0 S
Rule Menominee 1966 only - Apr lastSun 2:00 1:00 D
Rule Menominee 1966 only - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
-6:00 US C%sT 1946
-6:00 Menominee C%sT 1969 Apr 27 2:00
...
...
@@ -1205,6 +1267,12 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
#
# Other sources occasionally used include:
#
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
# <https://www.jstor.org/stable/1774359>.
#
# Pearce C. The Great Daylight Saving Time Controversy.
# Australian Ebook Publisher. 2017. ISBN 978-1-925516-96-8.
#
# Edward W. Whitman, World Time Differences,
# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated),
# which I found in the UCLA library.
...
...
@@ -1213,9 +1281,6 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# <http://cs.ucla.edu/~eggert/The-Waste-of-Daylight-19th.pdf>
# [PDF] (1914-03)
#
# Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94
# <https://www.jstor.org/stable/1774359>.
#
# See the 'europe' file for Greenland.
# Canada
...
...
@@ -1402,7 +1467,7 @@ Rule StJohns 2007 2011 - Mar Sun>=8 0:01 1:00 D
Rule StJohns 2007 2010 - Nov Sun>=1 0:01 0 S
#
# St John's has an apostrophe, but Posix file names can't have apostrophes.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/St_Johns -3:30:52 - LMT 1884
-3:30:52 StJohns N%sT 1918
-3:30:52 Canada N%sT 1919
...
...
@@ -1415,7 +1480,7 @@ Zone America/St_Johns -3:30:52 - LMT 1884
# most of east Labrador
# The name 'Happy Valley-Goose Bay' is too long; use 'Goose Bay'.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Valley-Goose Bay
-3:30:52 - NST 1918
-3:30:52 Canada N%sT 1919
...
...
@@ -1489,7 +1554,7 @@ Rule Halifax 1956 1959 - Apr lastSun 2:00 1:00 D
Rule Halifax 1956 1959 - Sep lastSun 2:00 0 S
Rule Halifax 1962 1973 - Apr lastSun 2:00 1:00 D
Rule Halifax 1962 1973 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Halifax -4:14:24 - LMT 1902 Jun 15
-4:00 Halifax A%sT 1918
-4:00 Canada A%sT 1919
...
...
@@ -1527,7 +1592,7 @@ Rule Moncton 1946 1956 - Sep lastSun 2:00 0 S
Rule Moncton 1957 1972 - Oct lastSun 2:00 0 S
Rule Moncton 1993 2006 - Apr Sun>=1 0:01 1:00 D
Rule Moncton 1993 2006 - Oct lastSun 0:01 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Moncton -4:19:08 - LMT 1883 Dec 9
-5:00 - EST 1902 Jun 15
-4:00 Canada A%sT 1933
...
...
@@ -1556,7 +1621,7 @@ Zone America/Moncton -4:19:08 - LMT 1883 Dec 9
# For lack of better info, guess this practice began around 1970, contra to
# Shanks & Pottenger who have this region observing AST/ADT.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Blanc-Sablon -3:48:28 - LMT 1884
-4:00 Canada A%sT 1970
-4:00 - AST
...
...
@@ -1724,19 +1789,10 @@ Rule Toronto 1922 1923 - May Sun>=8 2:00 1:00 D
# was meant.
Rule Toronto 1922 1926 - Sep Sun>=15 2:00 0 S
Rule Toronto 1924 1927 - May Sun>=1 2:00 1:00 D
# The 1927-to-1939 rules can be expressed more simply as
# Rule Toronto 1927 1937 - Sep Sun>=25 2:00 0 S
# Rule Toronto 1928 1937 - Apr Sun>=25 2:00 1:00 D
# Rule Toronto 1938 1940 - Apr lastSun 2:00 1:00 D
# Rule Toronto 1938 1939 - Sep lastSun 2:00 0 S
# The rules below avoid use of Sun>=25
# (which pre-2004 versions of zic cannot handle).
Rule Toronto 1927 1932 - Sep lastSun 2:00 0 S
Rule Toronto 1928 1931 - Apr lastSun 2:00 1:00 D
Rule Toronto 1932 only - May 1 2:00 1:00 D
Rule Toronto 1933 1940 - Apr lastSun 2:00 1:00 D
Rule Toronto 1933 only - Oct 1 2:00 0 S
Rule Toronto 1934 1939 - Sep lastSun 2:00 0 S
Rule Toronto 1927 1937 - Sep Sun>=25 2:00 0 S
Rule Toronto 1928 1937 - Apr Sun>=25 2:00 1:00 D
Rule Toronto 1938 1940 - Apr lastSun 2:00 1:00 D
Rule Toronto 1938 1939 - Sep lastSun 2:00 0 S
Rule Toronto 1945 1946 - Sep lastSun 2:00 0 S
Rule Toronto 1946 only - Apr lastSun 2:00 1:00 D
Rule Toronto 1947 1949 - Apr lastSun 0:00 1:00 D
...
...
@@ -1769,7 +1825,7 @@ Rule Toronto 1957 1973 - Oct lastSun 2:00 0 S
# War,... [t]he cities agreed to implement DST during the summer
# months for the remainder of the war years.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Toronto -5:17:32 - LMT 1895
-5:00 Canada E%sT 1919
-5:00 Toronto E%sT 1942 Feb 9 2:00s
...
...
@@ -1844,7 +1900,7 @@ Rule Winn 1963 only - Sep 22 2:00 0 S
Rule Winn 1966 1986 - Apr lastSun 2:00s 1:00 D
Rule Winn 1966 2005 - Oct lastSun 2:00s 0 S
Rule Winn 1987 2005 - Apr Sun>=1 2:00s 1:00 D
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16
-6:00 Winn C%sT 2006
-6:00 Canada C%sT
...
...
@@ -1866,6 +1922,12 @@ Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16
# Willett (1914-03) notes that DST "has been in operation ... in the
# City of Moose Jaw, Saskatchewan, for one year."
# From Paul Eggert (2019-07-25):
# Pearce's book says Regina observed DST in 1914-1917. No dates and times,
# unfortunately. It also says that in 1914 Saskatoon observed DST
# from 1 June to 6 July, and that DST was also tried out in Davidson,
# Melfort, and Prince Albert.
# From Paul Eggert (2006-03-22):
# Shanks & Pottenger say that since 1970 this region has mostly been as Regina.
# Some western towns (e.g. Swift Current) switched from MST/MDT to CST in 1972.
...
...
@@ -1928,7 +1990,7 @@ Rule Swift 1957 only - Oct lastSun 2:00 0 S
Rule Swift 1959 1961 - Apr lastSun 2:00 1:00 D
Rule Swift 1959 only - Oct lastSun 2:00 0 S
Rule Swift 1960 1961 - Sep lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Regina -6:58:36 - LMT 1905 Sep
-7:00 Regina M%sT 1960 Apr lastSun 2:00
-6:00 - CST
...
...
@@ -1941,6 +2003,19 @@ Zone America/Swift_Current -7:11:20 - LMT 1905 Sep
# Alberta
# From Alois Triendl (2019-07-19):
# There was no DST in Alberta in 1967... Calgary Herald, 29 April 1967.
# 1969, no DST, from Edmonton Journal 18 April 1969
#
# From Paul Eggert (2019-07-25):
# Pearce's book says that Alberta's 1948 Daylight Saving Act required
# Mountain Standard Time without DST, and that "anyone who broke that law
# could be fined up to $25 and costs". There seems to be no record of
# anybody paying the fine. The law was not changed until an August 1971
# plebiscite reinstituted DST in 1972. This story is also mentioned in:
# Boyer JP. Forcing Choice: The Risky Reward of Referendums. Dundum. 2017.
# ISBN 978-1459739123.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Edm 1918 1919 - Apr Sun>=8 2:00 1:00 D
Rule Edm 1918 only - Oct 27 2:00 0 S
...
...
@@ -1953,13 +2028,9 @@ Rule Edm 1945 only - Aug 14 23:00u 1:00 P # Peace
Rule Edm 1945 only - Sep lastSun 2:00 0 S
Rule Edm 1947 only - Apr lastSun 2:00 1:00 D
Rule Edm 1947 only - Sep lastSun 2:00 0 S
Rule Edm 1967 only - Apr lastSun 2:00 1:00 D
Rule Edm 1967 only - Oct lastSun 2:00 0 S
Rule Edm 1969 only - Apr lastSun 2:00 1:00 D
Rule Edm 1969 only - Oct lastSun 2:00 0 S
Rule Edm 1972 1986 - Apr lastSun 2:00 1:00 D
Rule Edm 1972 2006 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Edmonton -7:33:52 - LMT 1906 Sep
-7:00 Edm M%sT 1987
-7:00 Canada M%sT
...
...
@@ -2039,8 +2110,20 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep
# been on MST (-0700) like Dawson Creek since it advanced its clocks on
# 2015-03-08.
#
# From Paul Eggert (201
5-09-23
):
# From Paul Eggert (201
9-07-25
):
# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver.
# Alois Triendl confirmed this on 07-22, citing the 1946-04-27 Vancouver Daily
# Province. He also cited the 1946-09-28 Victoria Daily Times, which said
# that Vancouver, Victoria, etc. "change at midnight Saturday"; for now,
# guess they meant 02:00 Sunday since 02:00 was common practice in Vancouver.
#
# Early Vancouver, Volume Four, by Major J.S. Matthews, V.D., 2011 edition
# says that a 1922 plebiscite adopted DST, but a 1923 plebiscite rejected it.
# http://former.vancouver.ca/ctyclerk/archives/digitized/EarlyVan/SearchEarlyVan/Vol4pdf/MatthewsEarlyVancouverVol4_DaylightSavings.pdf
# A catalog entry for a newspaper clipping seems to indicate that Vancouver
# observed DST in 1941 from 07-07 through 09-27; see
# https://searcharchives.vancouver.ca/daylight-saving-1918-starts-again-july-7-1941-start-d-s-sept-27-end-of-d-s-1941
# We have no further details, so omit them for now.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Vanc 1918 only - Apr 14 2:00 1:00 D
...
...
@@ -2049,10 +2132,10 @@ Rule Vanc 1942 only - Feb 9 2:00 1:00 W # War
Rule Vanc 1945 only - Aug 14 23:00u 1:00 P # Peace
Rule Vanc 1945 only - Sep 30 2:00 0 S
Rule Vanc 1946 1986 - Apr lastSun 2:00 1:00 D
Rule Vanc 1946 only -
Oct 13
2:00 0 S
Rule Vanc 1946 only -
Sep 29
2:00 0 S
Rule Vanc 1947 1961 - Sep lastSun 2:00 0 S
Rule Vanc 1962 2006 - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Vancouver -8:12:28 - LMT 1884
-8:00 Vanc P%sT 1987
-8:00 Canada P%sT
...
...
@@ -2123,7 +2206,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# varying the manner of reckoning standard time.
#
# * Yukon Territory Commissioner's Order 1966-20 Interpretation Ordinance
#
http://? - no online source found
#
[no online source found]
#
# * Standard Time and Time Zones in Canada; Thomson, Malcolm M.; JRASC,
# Vol. 64, pp.129-162; June 1970; SAO/NASA Astrophysics Data System (ADS)
...
...
@@ -2156,7 +2239,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# to say eight hours behind Greenwich Time.
#
# * O.I.C. 1980/02 INTERPRETATION ACT
#
http://? - no online source found
#
[no online source found]
#
# * Yukon Daylight Saving Time, YOIC 1987/56
# https://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html
...
...
@@ -2372,7 +2455,7 @@ Rule NT_YK 1965 only - Oct lastSun 2:00 0 S
Rule NT_YK 1980 1986 - Apr lastSun 2:00 1:00 D
Rule NT_YK 1980 2006 - Oct lastSun 2:00 0 S
Rule NT_YK 1987 2006 - Apr Sun>=1 2:00 1:00 D
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
# aka Panniqtuuq
Zone America/Pangnirtung 0 - -00 1921 # trading post est.
-4:00 NT_YK A%sT 1995 Apr Sun>=1 2:00
...
...
@@ -2519,7 +2602,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# From Paul Eggert (2001-03-03):
#
# http
://www.latimes.com/news/nation/20010303/t000018766
.html
# http
s://www.latimes.com/archives/la-xpm-2001-mar-03-mn-32561-story
.html
# James F. Smith writes in today's LA Times
# * Sonora will continue to observe standard time.
# * Last week Mexico City's mayor Andrés Manuel López Obrador decreed that
...
...
@@ -2646,7 +2729,7 @@ Rule Mexico 2001 only - May Sun>=1 2:00 1:00 D
Rule Mexico 2001 only - Sep lastSun 2:00 0 S
Rule Mexico 2002 max - Apr Sun>=1 2:00 1:00 D
Rule Mexico 2002 max - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
# Quintana Roo; represented by Cancún
Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56
-6:00 - CST 1981 Dec 23
...
...
@@ -2839,7 +2922,7 @@ Zone America/Tijuana -7:48:04 - LMT 1922 Jan 1 0:11:56
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Bahamas 1964 1975 - Oct lastSun 2:00 0 S
Rule Bahamas 1964 1975 - Apr lastSun 2:00 1:00 D
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Nassau -5:09:30 - LMT 1912 Mar 2
-5:00 Bahamas E%sT 1976
-5:00 US E%sT
...
...
@@ -2854,7 +2937,7 @@ Rule Barb 1977 1978 - Oct Sun>=1 2:00 0 S
Rule Barb 1978 1980 - Apr Sun>=15 2:00 1:00 D
Rule Barb 1979 only - Sep 30 2:00 0 S
Rule Barb 1980 only - Sep 25 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Barbados -3:58:29 - LMT 1924 # Bridgetown
-3:58:29 - BMT 1932 # Bridgetown Mean Time
-4:00 Barb A%sT
...
...
@@ -2868,7 +2951,7 @@ Rule Belize 1973 only - Dec 5 0:00 1:00 CDT
Rule Belize 1974 only - Feb 9 0:00 0 CST
Rule Belize 1982 only - Dec 18 0:00 1:00 CDT
Rule Belize 1983 only - Feb 12 0:00 0 CST
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Belize -5:52:48 - LMT 1912 Apr
-6:00 Belize %s
...
...
@@ -2885,7 +2968,7 @@ Zone America/Belize -5:52:48 - LMT 1912 Apr
# Friday, the same thing will happen in Bermuda.
# http://www.theroyalgazette.com/apps/pbcs.dll/article?AID=/20060529/NEWS/105290135
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton
-4:00 - AST 1974 Apr 28 2:00
-4:00 Canada A%sT 1976
...
...
@@ -2907,7 +2990,7 @@ Rule CR 1991 1992 - Jan Sat>=15 0:00 1:00 D
Rule CR 1991 only - Jul 1 0:00 0 S
Rule CR 1992 only - Mar 15 0:00 0 S
# There are too many San Josés elsewhere, so we'll use 'Costa Rica'.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Costa_Rica -5:36:13 - LMT 1890 # San José
-5:36:13 - SJMT 1921 Jan 15 # San José Mean Time
-6:00 CR C%sT
...
...
@@ -3113,7 +3196,7 @@ Rule Cuba 2012 only - Apr 1 0:00s 1:00 D
Rule Cuba 2012 max - Nov Sun>=1 0:00s 0 S
Rule Cuba 2013 max - Mar Sun>=8 0:00s 1:00 D
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Havana -5:29:28 - LMT 1890
-5:29:36 - HMT 1925 Jul 19 12:00 # Havana MT
-5:00 Cuba C%sT
...
...
@@ -3148,7 +3231,7 @@ Rule DR 1969 1973 - Oct lastSun 0:00 0:30 -0430
Rule DR 1970 only - Feb 21 0:00 0 EST
Rule DR 1971 only - Jan 20 0:00 0 EST
Rule DR 1972 1974 - Jan 21 0:00 0 EST
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Santo_Domingo -4:39:36 - LMT 1890
-4:40 - SDMT 1933 Apr 1 12:00 # S. Dom. MT
-5:00 DR %s 1974 Oct 27
...
...
@@ -3163,7 +3246,7 @@ Rule Salv 1987 1988 - May Sun>=1 0:00 1:00 D
Rule Salv 1987 1988 - Sep lastSun 0:00 0 S
# There are too many San Salvadors elsewhere, so use America/El_Salvador
# instead of America/San_Salvador.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador
-6:00 Salv C%sT
...
...
@@ -3196,7 +3279,7 @@ Rule Guat 1991 only - Mar 23 0:00 1:00 D
Rule Guat 1991 only - Sep 7 0:00 0 S
Rule Guat 2006 only - Apr 30 0:00 1:00 D
Rule Guat 2006 only - Oct 1 0:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Guatemala -6:02:04 - LMT 1918 Oct 5
-6:00 Guat C%sT
...
...
@@ -3282,7 +3365,7 @@ Rule Haiti 2012 2015 - Mar Sun>=8 2:00 1:00 D
Rule Haiti 2012 2015 - Nov Sun>=1 2:00 0 S
Rule Haiti 2017 max - Mar Sun>=8 2:00 1:00 D
Rule Haiti 2017 max - Nov Sun>=1 2:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Port-au-Prince -4:49:20 - LMT 1890
-4:49 - PPMT 1917 Jan 24 12:00 # P-a-P MT
-5:00 Haiti E%sT
...
...
@@ -3321,7 +3404,7 @@ Rule Hond 1987 1988 - May Sun>=1 0:00 1:00 D
Rule Hond 1987 1988 - Sep lastSun 0:00 0 S
Rule Hond 2006 only - May Sun>=1 0:00 1:00 D
Rule Hond 2006 only - Aug Mon>=1 0:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Tegucigalpa -5:48:52 - LMT 1921 Apr
-6:00 Hond C%sT
#
...
...
@@ -3342,7 +3425,7 @@ Zone America/Tegucigalpa -5:48:52 - LMT 1921 Apr
# Neita L. The politician in all of us. Jamaica Observer 2014-09-20
# http://www.jamaicaobserver.com/columns/The-politician-in-all-of-us_17573647
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Jamaica -5:07:10 - LMT 1890 # Kingston
-5:07:10 - KMT 1912 Feb # Kingston Mean Time
-5:00 - EST 1974
...
...
@@ -3350,7 +3433,7 @@ Zone America/Jamaica -5:07:10 - LMT 1890 # Kingston
-5:00 - EST
# Martinique
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Martinique -4:04:20 - LMT 1890 # Fort-de-France
-4:04:20 - FFMT 1911 May # Fort-de-France MT
-4:00 - AST 1980 Apr 6
...
...
@@ -3414,7 +3497,7 @@ Rule Nic 2005 only - Apr 10 0:00 1:00 D
Rule Nic 2005 only - Oct Sun>=1 0:00 0 S
Rule Nic 2006 only - Apr 30 2:00 1:00 D
Rule Nic 2006 only - Oct Sun>=1 1:00 0 S
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Managua -5:45:08 - LMT 1890
-5:45:12 - MMT 1934 Jun 23 # Managua Mean Time?
-6:00 - CST 1973 May
...
...
@@ -3426,7 +3509,7 @@ Zone America/Managua -5:45:08 - LMT 1890
-6:00 Nic C%sT
# Panama
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Panama -5:18:08 - LMT 1890
-5:19:36 - CMT 1908 Apr 22 # Colón Mean Time
-5:00 - EST
...
...
@@ -3434,7 +3517,7 @@ Link America/Panama America/Cayman
# Puerto Rico
# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan
-4:00 - AST 1942 May 3
-4:00 US A%sT 1946
...
...
@@ -3446,7 +3529,7 @@ Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan
# St Pierre and Miquelon
# There are too many St Pierres elsewhere, so we'll use 'Miquelon'.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre
-4:00 - AST 1980 May
-3:00 - -03 1987
...
...
@@ -3492,7 +3575,7 @@ Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre
# by March 2018 for TCI. Magnetic Media. 2017-08-25.
# http://magneticmediatv.com/2017/08/time-change-back-by-march-2018-for-tci/
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Grand_Turk -4:44:32 - LMT 1890
-5:07:10 - KMT 1912 Feb # Kingston Mean Time
-5:00 - EST 1979
...
...
make/data/tzdata/pacificnew
浏览文件 @
a495795c
...
...
@@ -44,7 +44,7 @@
## Rule Twilite XXXX max uspres Nov Sun>=7 2:00 0 S
## Rule Twilite XXXX max nonpres Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES/SAVE FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES/SAVE FORMAT [UNTIL]
## Zone America/Los_Angeles-PET -8:00 US P%sT XXXX
## -8:00 Twilite P%sT
...
...
make/data/tzdata/southamerica
浏览文件 @
a495795c
...
...
@@ -419,7 +419,7 @@ Rule Arg 2008 only - Oct Sun>=15 0:00 1:00 -
# plus is that this silences a zic complaint that there's no POSIX TZ
# setting for timestamps past 2038.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
#
# Buenos Aires (BA), Capital Federal (CF),
Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31
...
...
@@ -600,7 +600,7 @@ Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31
Link America/Curacao America/Aruba
# Bolivia
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/La_Paz -4:32:36 - LMT 1890
-4:32:36 - CMT 1931 Oct 15 # Calamarca MT
-4:32:36 1:00 BST 1932 Mar 21 # Bolivia ST
...
...
@@ -943,14 +943,13 @@ Rule Brazil 2012 only - Feb Sun>=22 0:00 0 -
# removed Tocantins.
Rule Brazil 2013 2014 - Feb Sun>=15 0:00 0 -
Rule Brazil 2015 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2016 20
22
- Feb Sun>=15 0:00 0 -
Rule Brazil 2016 20
19
- Feb Sun>=15 0:00 0 -
# From Steffen Thorsen (2017-12-18):
# According to many media sources, next year's DST start in Brazil will move to
# the first Sunday of November
, and it will stay like that for the years after.
# the first Sunday of November
# ... https://www.timeanddate.com/news/time/brazil-delays-dst-2018.html
# From Steffen Thorsen (2017-12-20):
# http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2017/decreto/D9242.htm
#
# From Fábio Gomes (2018-10-04):
# The Brazilian president just announced a new change on this year DST.
# It was scheduled to start on November 4th and it was changed to November 18th.
...
...
@@ -958,22 +957,21 @@ Rule Brazil 2016 2022 - Feb Sun>=15 0:00 0 -
# The Brazilian government just announced that the change in DST was
# canceled.... Maybe the president Michel Temer also woke up one hour
# earlier today. :)
Rule Brazil 2018 max - Nov Sun>=1 0:00 1:00 -
Rule Brazil 2023 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2024 2025 - Feb Sun>=15 0:00 0 -
Rule Brazil 2026 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2027 2033 - Feb Sun>=15 0:00 0 -
Rule Brazil 2034 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2035 2036 - Feb Sun>=15 0:00 0 -
Rule Brazil 2037 only - Feb Sun>=22 0:00 0 -
# From Arthur David Olson (2008-09-29):
# The next is wrong in some years but is better than nothing.
Rule Brazil 2038 max - Feb Sun>=15 0:00 0 -
# The latest ruleset listed above says that the following states observe DST:
Rule Brazil 2018 only - Nov Sun>=1 0:00 1:00 -
# The last ruleset listed above says that the following states observed DST:
# DF, ES, GO, MG, MS, MT, PR, RJ, RS, SC, SP.
#
# From Steffen Thorsen (2019-04-05):
# According to multiple sources the Brazilian president wants to get rid of DST.
# https://gmconline.com.br/noticias/politica/bolsonaro-horario-de-verao-deve-acabar-este-ano
# https://g1.globo.com/economia/noticia/2019/04/05/governo-anuncia-fim-do-horario-de-verao.ghtml
# From Marcus Diniz (2019-04-25):
# Brazil no longer has DST changes - decree signed today
# https://g1.globo.com/politica/noticia/2019/04/25/bolsonaro-assina-decreto-que-acaba-com-o-horario-de-verao.ghtml
# From Daniel Soares de Oliveira (2019-04-26):
# http://www.planalto.gov.br/ccivil_03/_Ato2019-2022/2019/Decreto/D9772.htm
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
#
# Fernando de Noronha (administratively part of PE)
Zone America/Noronha -2:09:40 - LMT 1914
...
...
@@ -1255,14 +1253,8 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# From Juan Correa (2016-12-04):
# Magallanes region ... will keep DST (UTC -3) all year round....
# http://www.soychile.cl/Santiago/Sociedad/2016/12/04/433428/Bachelet-firmo-el-decreto-para-establecer-un-horario-unico-para-la-Region-de-Magallanes.aspx
#
# From Deborah Goldsmith (2017-01-19):
# http://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf
# From Paul Eggert (2017-01-19):
# The above says the Magallanes change expires 2019-05-11 at 24:00,
# so in theory, they will revert to -04/-03 after that, which means
# they will switch from -03 to -04 one hour after Santiago does that day.
# For now, assume that they will not revert.
# From Juan Correa (2018-08-13):
# As of moments ago, the Ministry of Energy in Chile has announced the new
...
...
@@ -1281,6 +1273,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# https://twitter.com/MinEnergia/status/1029009354001973248
# "We will keep the new time policy unchanged for at least the next 4 years."
# So we extend the new rules on Saturdays at 24:00 mainland time indefinitely.
# From Juan Correa (2019-02-04):
# http://www.diariooficial.interior.gob.cl/publicaciones/2018/11/23/42212/01/1498738.pdf
# From Paul Eggert (2019-09-01):
# The above says the Magallanes exception expires 2022-04-02 at 24:00,
# so in theory, they will revert to -04/-03 after that.
# For now, assume that they will not revert,
# since they have extended the expiration date once already.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Chile 1927 1931 - Sep 1 0:00 1:00 -
...
...
@@ -1321,7 +1320,7 @@ Rule Chile 2019 max - Apr Sun>=2 3:00u 0 -
Rule Chile 2019 max - Sep Sun>=2 4:00u 1:00 -
# IATA SSIM anomalies: (1992-02) says 1992-03-14;
# (1996-09) says 1998-03-08. Ignore these.
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Santiago -4:42:46 - LMT 1890
-4:42:46 - SMT 1910 Jan 10 # Santiago Mean Time
-5:00 - -05 1916 Jul 1
...
...
@@ -1370,7 +1369,7 @@ Zone Pacific/Easter -7:17:28 - LMT 1890
# Palmer has followed Chile. Prior to that, before the Falklands War,
# Palmer used to be supplied from Argentina.
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Antarctica/Palmer 0 - -00 1965
-4:00 Arg -04/-03 1969 Oct 5
-3:00 Arg -03/-02 1982 May
...
...
@@ -1385,7 +1384,7 @@ Zone Antarctica/Palmer 0 - -00 1965
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule CO 1992 only - May 3 0:00 1:00 -
Rule CO 1993 only - Apr 4 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Bogota -4:56:16 - LMT 1884 Mar 13
-4:56:16 - BMT 1914 Nov 23 # Bogotá Mean Time
-5:00 CO -05/-04
...
...
@@ -1410,7 +1409,7 @@ Zone America/Bogota -4:56:16 - LMT 1884 Mar 13
# Netherlands as Kingdom Islands. This won't affect their time zones
# though, as far as we know.
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad
-4:30 - -0430 1965
-4:00 - AST
...
...
@@ -1446,7 +1445,7 @@ Link America/Curacao America/Kralendijk # Caribbean Netherlands
Rule Ecuador 1992 only - Nov 28 0:00 1:00 -
Rule Ecuador 1993 only - Feb 5 0:00 0 -
#
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Guayaquil -5:19:20 - LMT 1890
-5:14:00 - QMT 1931 # Quito Mean Time
-5:00 Ecuador -05/-04
...
...
@@ -1549,7 +1548,7 @@ Rule Falk 1985 2000 - Sep Sun>=9 0:00 1:00 -
Rule Falk 1986 2000 - Apr Sun>=16 0:00 0 -
Rule Falk 2001 2010 - Apr Sun>=15 2:00 0 -
Rule Falk 2001 2010 - Sep Sun>=1 2:00 1:00 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Atlantic/Stanley -3:51:24 - LMT 1890
-3:51:24 - SMT 1912 Mar 12 # Stanley Mean Time
-4:00 Falk -04/-03 1983 May
...
...
@@ -1558,13 +1557,13 @@ Zone Atlantic/Stanley -3:51:24 - LMT 1890
-3:00 - -03
# French Guiana
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Cayenne -3:29:20 - LMT 1911 Jul
-4:00 - -04 1967 Oct
-3:00 - -03
# Guyana
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown
-3:45 - -0345 1975 Jul 31
-3:00 - -03 1991
...
...
@@ -1658,7 +1657,7 @@ Rule Para 2010 2012 - Apr Sun>=8 0:00 0 -
# http://www.presidencia.gov.py/archivos/documentos/DECRETO1264_ey9r8zai.pdf
Rule Para 2013 max - Mar Sun>=22 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Asuncion -3:50:40 - LMT 1890
-3:50:40 - AMT 1931 Oct 10 # Asunción Mean Time
-4:00 - -04 1972 Oct
...
...
@@ -1687,13 +1686,13 @@ Rule Peru 1990 only - Apr 1 0:00 0 -
# IATA is ambiguous for 1993/1995; go with Shanks & Pottenger.
Rule Peru 1994 only - Jan 1 0:00 1:00 -
Rule Peru 1994 only - Apr 1 0:00 0 -
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Lima -5:08:12 - LMT 1890
-5:08:36 - LMT 1908 Jul 28 # Lima Mean Time?
-5:00 Peru -05/-04
# South Georgia
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken
-2:00 - -02
...
...
@@ -1701,7 +1700,7 @@ Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken
# uninhabited; scientific personnel have wintered
# Suriname
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Paramaribo -3:40:40 - LMT 1911
-3:40:52 - PMT 1935 # Paramaribo Mean Time
-3:40:36 - PMT 1945 Oct # The capital moved?
...
...
@@ -1709,7 +1708,7 @@ Zone America/Paramaribo -3:40:40 - LMT 1911
-3:00 - -03
# Trinidad and Tobago
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
-4:00 - AST
...
...
@@ -1980,7 +1979,7 @@ Zone America/Montevideo -3:44:51 - LMT 1908 Jun 10
# ... published in the official Gazette [2016-04-18], here:
# http://historico.tsj.gob.ve/gaceta_ext/abril/1842016/E-1842016-4551.pdf
# Zone NAME
GMT
OFF RULES FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES FORMAT [UNTIL]
Zone America/Caracas -4:27:44 - LMT 1890
-4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time?
-4:30 - -0430 1965 Jan 1 0:00
...
...
make/data/tzdata/systemv
浏览文件 @
a495795c
...
...
@@ -46,7 +46,7 @@ Rule SystemV 1975 only - Oct lastSun 2:00 0 S
Rule SystemV 1976 max - Apr lastSun 2:00 1:00 D
Rule SystemV 1976 max - Oct lastSun 2:00 0 S
# Zone NAME
GMT
OFF RULES/SAVE FORMAT [UNTIL]
# Zone NAME
STD
OFF RULES/SAVE FORMAT [UNTIL]
## Zone SystemV/AST4ADT -4:00 SystemV A%sT
## Zone SystemV/EST5EDT -5:00 SystemV E%sT
## Zone SystemV/CST6CDT -6:00 SystemV C%sT
...
...
make/data/tzdata/zone.tab
浏览文件 @
a495795c
...
...
@@ -355,7 +355,10 @@ RO +4426+02606 Europe/Bucharest
RS +4450+02030 Europe/Belgrade
RU +5443+02030 Europe/Kaliningrad MSK-01 - Kaliningrad
RU +554521+0373704 Europe/Moscow MSK+00 - Moscow area
RU +4457+03406 Europe/Simferopol MSK+00 - Crimea
# The obsolescent zone.tab format cannot represent Europe/Simferopol well.
# Put it in RU section and list as UA. See "territorial claims" above.
# Programs should use zone1970.tab instead; see above.
UA +4457+03406 Europe/Simferopol MSK+00 - Crimea
RU +5836+04939 Europe/Kirov MSK+00 - Kirov
RU +4621+04803 Europe/Astrakhan MSK+01 - Astrakhan
RU +4844+04425 Europe/Volgograd MSK+01 - Volgograd
...
...
make/lib/NetworkingLibraries.gmk
浏览文件 @
a495795c
...
...
@@ -75,7 +75,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
LDFLAGS_SUFFIX_linux := $(LIBDL) -ljvm -lpthread -ljava, \
LDFLAGS_SUFFIX_aix := $(LIBDL) -ljvm -ljava,\
LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
delayimp.lib
urlmon.lib
$(WIN_JAVA_LIB) advapi32.lib \
delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
-DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
...
...
src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java
浏览文件 @
a495795c
/*
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
9
, 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
...
...
@@ -668,7 +668,11 @@ public class Krb5LoginModule implements LoginModule {
// check to renew credentials
if
(!
isCurrent
(
cred
))
{
if
(
renewTGT
)
{
cred
=
renewCredentials
(
cred
);
Credentials
newCred
=
renewCredentials
(
cred
);
if
(
newCred
!=
null
)
{
newCred
.
setProxy
(
cred
.
getProxy
());
}
cred
=
newCred
;
}
else
{
// credentials have expired
cred
=
null
;
...
...
@@ -1074,6 +1078,10 @@ public class Krb5LoginModule implements LoginModule {
// create Kerberos Ticket
if
(
isInitiator
)
{
kerbTicket
=
Krb5Util
.
credsToTicket
(
cred
);
if
(
cred
.
getProxy
()
!=
null
)
{
KerberosSecrets
.
getJavaxSecurityAuthKerberosAccess
()
.
kerberosTicketSetProxy
(
kerbTicket
,
Krb5Util
.
credsToTicket
(
cred
.
getProxy
()));
}
}
if
(
storeKey
&&
encKeys
!=
null
)
{
...
...
src/share/classes/java/awt/Font.java
浏览文件 @
a495795c
...
...
@@ -1750,6 +1750,7 @@ public class Font implements java.io.Serializable
// value is the default.
if
(
fRequestedAttributes
!=
null
)
{
try
{
values
=
getAttributeValues
();
// init
AttributeValues
extras
=
AttributeValues
.
fromSerializableHashtable
(
fRequestedAttributes
);
...
...
@@ -1759,10 +1760,13 @@ public class Font implements java.io.Serializable
values
=
getAttributeValues
().
merge
(
extras
);
this
.
nonIdentityTx
=
values
.
anyNonDefault
(
EXTRA_MASK
);
this
.
hasLayoutAttributes
=
values
.
anyNonDefault
(
LAYOUT_MASK
);
}
catch
(
Throwable
t
)
{
throw
new
IOException
(
t
);
}
finally
{
fRequestedAttributes
=
null
;
// don't need it any more
}
}
}
/**
* Returns the number of glyphs in this <code>Font</code>. Glyph codes
...
...
src/share/classes/java/io/FilePermission.java
浏览文件 @
a495795c
...
...
@@ -25,12 +25,16 @@
package
java.io
;
import
java.net.URI
;
import
java.nio.file.InvalidPathException
;
import
java.security.*
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.ArrayList
;
import
java.util.Vector
;
import
java.util.Collections
;
import
sun.nio.fs.DefaultFileSystemProvider
;
import
sun.security.util.SecurityConstants
;
/**
...
...
@@ -152,6 +156,8 @@ public final class FilePermission extends Permission implements Serializable {
private
transient
String
cpath
;
private
transient
boolean
invalid
;
// whether input path is invalid
// static Strings used by init(int mask)
private
static
final
char
RECURSIVE_CHAR
=
'-'
;
private
static
final
char
WILD_CHAR
=
'*'
;
...
...
@@ -173,6 +179,14 @@ public final class FilePermission extends Permission implements Serializable {
private
static
final
long
serialVersionUID
=
7930732926638008763L
;
/**
* Always use the internal default file system, in case it was modified
* with java.nio.file.spi.DefaultFileSystemProvider.
*/
private
static
final
java
.
nio
.
file
.
FileSystem
builtInFS
=
DefaultFileSystemProvider
.
create
()
.
getFileSystem
(
URI
.
create
(
"file:///"
));
/**
* initialize a FilePermission object. Common to all constructors.
* Also called during de-serialization.
...
...
@@ -199,6 +213,20 @@ public final class FilePermission extends Permission implements Serializable {
return
;
}
// Validate path by platform's default file system
// Note: this check does not apply during FilePermission
// class initialization.
if
(
builtInFS
!=
null
)
{
try
{
String
name
=
cpath
.
endsWith
(
"*"
)
?
cpath
.
substring
(
0
,
cpath
.
length
()
-
1
)
+
"-"
:
cpath
;
builtInFS
.
getPath
(
new
File
(
name
).
getPath
());
}
catch
(
InvalidPathException
ipe
)
{
invalid
=
true
;
return
;
}
}
// store only the canonical cpath if possible
cpath
=
AccessController
.
doPrivileged
(
new
PrivilegedAction
<
String
>()
{
public
String
run
()
{
...
...
@@ -335,6 +363,12 @@ public final class FilePermission extends Permission implements Serializable {
* @return the effective mask
*/
boolean
impliesIgnoreMask
(
FilePermission
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
this
.
invalid
||
that
.
invalid
)
{
return
false
;
}
if
(
this
.
directory
)
{
if
(
this
.
recursive
)
{
// make sure that.path is longer then path so
...
...
@@ -395,6 +429,9 @@ public final class FilePermission extends Permission implements Serializable {
FilePermission
that
=
(
FilePermission
)
obj
;
if
(
this
.
invalid
||
that
.
invalid
)
{
return
false
;
}
return
(
this
.
mask
==
that
.
mask
)
&&
this
.
cpath
.
equals
(
that
.
cpath
)
&&
(
this
.
directory
==
that
.
directory
)
&&
...
...
src/share/classes/java/net/NetPermission.java
浏览文件 @
a495795c
/*
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
9
, 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
...
...
@@ -150,6 +150,15 @@ stream handler that gets the actual bytes from someplace it does
have access to. Thus it might be able to trick the system into
creating a ProtectionDomain/CodeSource for a class even though
that class really didn't come from that location.</td>
* </tr>
*
* <tr>
* <th scope="row">setSocketImpl</th>
* <td>The ability to create a sub-class of Socket or ServerSocket with a
* user specified SocketImpl.</td>
* <td>Malicious user-defined SocketImpls can change the behavior of
* Socket and ServerSocket in surprising ways, by virtue of their
* ability to access the protected fields of SocketImpl.</td>
* </tr>
* </table>
*
...
...
src/share/classes/java/net/ServerSocket.java
浏览文件 @
a495795c
...
...
@@ -31,6 +31,8 @@ import java.nio.channels.ServerSocketChannel;
import
java.security.AccessController
;
import
java.security.PrivilegedExceptionAction
;
import
sun.security.util.SecurityConstants
;
/**
* This class implements server sockets. A server socket waits for
* requests to come in over the network. It performs some operation
...
...
@@ -71,12 +73,25 @@ class ServerSocket implements java.io.Closeable {
/**
* Package-private constructor to create a ServerSocket associated with
* the given SocketImpl.
*
* @throws SecurityException if a security manager is set and
* its {@code checkPermission} method doesn't allow
* {@code NetPermission("setSocketImpl")}.
*/
ServerSocket
(
SocketImpl
impl
)
{
checkPermission
();
this
.
impl
=
impl
;
impl
.
setServerSocket
(
this
);
}
private
static
Void
checkPermission
()
{
SecurityManager
sm
=
System
.
getSecurityManager
();
if
(
sm
!=
null
)
{
sm
.
checkPermission
(
SecurityConstants
.
SET_SOCKETIMPL_PERMISSION
);
}
return
null
;
}
/**
* Creates an unbound server socket.
*
...
...
src/share/classes/java/net/Socket.java
浏览文件 @
a495795c
...
...
@@ -25,6 +25,8 @@
package
java.net
;
import
sun.security.util.SecurityConstants
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.io.IOException
;
...
...
@@ -159,9 +161,14 @@ class Socket implements java.io.Closeable {
*
* @exception SocketException if there is an error in the underlying protocol,
* such as a TCP error.
*
* @throws SecurityException if {@code impl} is non-null and a security manager is set
* and its {@code checkPermission} method doesn't allow {@code NetPermission("setSocketImpl")}.
*
* @since JDK1.1
*/
protected
Socket
(
SocketImpl
impl
)
throws
SocketException
{
checkPermission
(
impl
);
this
.
impl
=
impl
;
if
(
impl
!=
null
)
{
checkOldImpl
();
...
...
@@ -169,6 +176,17 @@ class Socket implements java.io.Closeable {
}
}
private
static
Void
checkPermission
(
SocketImpl
impl
)
{
if
(
impl
==
null
)
{
return
null
;
}
SecurityManager
sm
=
System
.
getSecurityManager
();
if
(
sm
!=
null
)
{
sm
.
checkPermission
(
SecurityConstants
.
SET_SOCKETIMPL_PERMISSION
);
}
return
null
;
}
/**
* Creates a stream socket and connects it to the specified port
* number on the named host.
...
...
src/share/classes/java/net/URL.java
浏览文件 @
a495795c
...
...
@@ -428,6 +428,16 @@ public final class URL implements java.io.Serializable {
throw
new
MalformedURLException
(
s
);
}
}
if
(
"jar"
.
equalsIgnoreCase
(
protocol
))
{
if
(
handler
instanceof
sun
.
net
.
www
.
protocol
.
jar
.
Handler
)
{
// URL.openConnection() would throw a confusing exception
// so generate a better exception here instead.
String
s
=
((
sun
.
net
.
www
.
protocol
.
jar
.
Handler
)
handler
).
checkNestedProtocol
(
file
);
if
(
s
!=
null
)
{
throw
new
MalformedURLException
(
s
);
}
}
}
}
/**
...
...
src/share/classes/java/util/regex/Pattern.java
浏览文件 @
a495795c
...
...
@@ -1348,7 +1348,11 @@ public final class Pattern
localCount
=
0
;
if
(
pattern
.
length
()
>
0
)
{
try
{
compile
();
}
catch
(
StackOverflowError
soe
)
{
throw
error
(
"Stack overflow during pattern compilation"
);
}
}
else
{
root
=
new
Start
(
lastAccept
);
matchRoot
=
lastAccept
;
...
...
@@ -1905,6 +1909,10 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
int
ch
=
temp
[
cursor
++];
while
(
ch
!=
0
&&
!
isLineSeparator
(
ch
))
ch
=
temp
[
cursor
++];
if
(
ch
==
0
&&
cursor
>
patternLength
)
{
cursor
=
patternLength
;
ch
=
temp
[
cursor
++];
}
return
ch
;
}
...
...
@@ -1915,6 +1923,10 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
int
ch
=
temp
[++
cursor
];
while
(
ch
!=
0
&&
!
isLineSeparator
(
ch
))
ch
=
temp
[++
cursor
];
if
(
ch
==
0
&&
cursor
>
patternLength
)
{
cursor
=
patternLength
;
ch
=
temp
[
cursor
];
}
return
ch
;
}
...
...
src/share/classes/javax/security/auth/kerberos/JavaxSecurityAuthKerberosAccessImpl.java
浏览文件 @
a495795c
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
9
, 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
...
...
@@ -26,8 +26,6 @@
package
javax.security.auth.kerberos
;
import
sun.security.krb5.JavaxSecurityAuthKerberosAccess
;
import
sun.security.krb5.EncryptionKey
;
import
sun.security.krb5.PrincipalName
;
class
JavaxSecurityAuthKerberosAccessImpl
implements
JavaxSecurityAuthKerberosAccess
{
...
...
@@ -35,4 +33,10 @@ class JavaxSecurityAuthKerberosAccessImpl
KeyTab
ktab
)
{
return
ktab
.
takeSnapshot
();
}
public
KerberosTicket
kerberosTicketGetProxy
(
KerberosTicket
t
)
{
return
t
.
proxy
;
}
public
void
kerberosTicketSetProxy
(
KerberosTicket
t
,
KerberosTicket
p
)
{
t
.
proxy
=
p
;
}
}
src/share/classes/javax/security/auth/kerberos/KerberosTicket.java
浏览文件 @
a495795c
/*
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
9
, 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
...
...
@@ -29,11 +29,13 @@ import java.io.*;
import
java.util.Date
;
import
java.util.Arrays
;
import
java.net.InetAddress
;
import
java.util.Objects
;
import
javax.crypto.SecretKey
;
import
javax.security.auth.Refreshable
;
import
javax.security.auth.Destroyable
;
import
javax.security.auth.RefreshFailedException
;
import
javax.security.auth.DestroyFailedException
;
import
sun.misc.HexDumpEncoder
;
import
sun.security.krb5.EncryptionKey
;
import
sun.security.krb5.Asn1Exception
;
...
...
@@ -190,9 +192,14 @@ public class KerberosTicket implements Destroyable, Refreshable,
* @serial
*/
private
InetAddress
[]
clientAddresses
;
/**
* Evidence ticket if proxy_impersonator. This field can be accessed
* by KerberosSecrets. It's serialized.
*/
KerberosTicket
proxy
=
null
;
private
transient
boolean
destroyed
=
false
;
/**
...
...
@@ -662,6 +669,7 @@ public class KerberosTicket implements Destroyable, Refreshable,
"Renew Till = "
+
String
.
valueOf
(
renewTill
)
+
"\n"
+
"Client Addresses "
+
(
clientAddresses
==
null
?
" Null "
:
caddrBuf
.
toString
()
+
(
proxy
==
null
?
""
:
"\nwith a proxy ticket"
)
+
"\n"
));
}
...
...
@@ -699,6 +707,10 @@ public class KerberosTicket implements Destroyable, Refreshable,
// clientAddress may be null, the array's hashCode is 0
result
=
result
*
37
+
Arrays
.
hashCode
(
clientAddresses
);
if
(
proxy
!=
null
)
{
result
=
result
*
37
+
proxy
.
hashCode
();
}
return
result
*
37
+
Arrays
.
hashCode
(
flags
);
}
...
...
@@ -764,6 +776,10 @@ public class KerberosTicket implements Destroyable, Refreshable,
return
false
;
}
if
(!
Objects
.
equals
(
proxy
,
otherTicket
.
proxy
))
{
return
false
;
}
return
true
;
}
...
...
src/share/classes/sun/font/CMap.java
浏览文件 @
a495795c
...
...
@@ -130,7 +130,7 @@ abstract class CMap {
static
final
char
noSuchChar
=
(
char
)
0xfffd
;
static
final
int
SHORTMASK
=
0x0000ffff
;
static
final
int
INTMASK
=
0x
f
fffffff
;
static
final
int
INTMASK
=
0x
7
fffffff
;
static
final
char
[][]
converterMaps
=
new
char
[
7
][];
...
...
@@ -885,7 +885,11 @@ abstract class CMap {
bbuffer
.
position
(
12
);
bbuffer
.
get
(
is32
);
nGroups
=
bbuffer
.
getInt
();
nGroups
=
bbuffer
.
getInt
()
&
INTMASK
;
// A map group record is three uint32's making for 12 bytes total
if
(
bbuffer
.
remaining
()
<
(
12
*
(
long
)
nGroups
))
{
throw
new
RuntimeException
(
"Format 8 table exceeded"
);
}
startCharCode
=
new
int
[
nGroups
];
endCharCode
=
new
int
[
nGroups
];
startGlyphID
=
new
int
[
nGroups
];
...
...
@@ -913,9 +917,13 @@ abstract class CMap {
CMapFormat10
(
ByteBuffer
bbuffer
,
int
offset
,
char
[]
xlat
)
{
bbuffer
.
position
(
offset
+
12
);
firstCode
=
bbuffer
.
getInt
()
&
INTMASK
;
entryCount
=
bbuffer
.
getInt
()
&
INTMASK
;
bbuffer
.
position
(
offset
+
20
);
// each glyph is a uint16, so 2 bytes per value.
if
(
bbuffer
.
remaining
()
<
(
2
*
(
long
)
entryCount
))
{
throw
new
RuntimeException
(
"Format 10 table exceeded"
);
}
CharBuffer
buffer
=
bbuffer
.
asCharBuffer
();
glyphIdArray
=
new
char
[
entryCount
];
for
(
int
i
=
0
;
i
<
entryCount
;
i
++)
{
...
...
@@ -955,11 +963,15 @@ abstract class CMap {
throw
new
RuntimeException
(
"xlat array for cmap fmt=12"
);
}
numGroups
=
buffer
.
getInt
(
offset
+
12
);
buffer
.
position
(
offset
+
12
);
numGroups
=
buffer
.
getInt
()
&
INTMASK
;
// A map group record is three uint32's making for 12 bytes total
if
(
buffer
.
remaining
()
<
(
12
*
(
long
)
numGroups
))
{
throw
new
RuntimeException
(
"Format 12 table exceeded"
);
}
startCharCode
=
new
long
[
numGroups
];
endCharCode
=
new
long
[
numGroups
];
startGlyphID
=
new
int
[
numGroups
];
buffer
.
position
(
offset
+
16
);
buffer
=
buffer
.
slice
();
IntBuffer
ibuffer
=
buffer
.
asIntBuffer
();
for
(
int
i
=
0
;
i
<
numGroups
;
i
++)
{
...
...
src/share/classes/sun/font/FileFont.java
浏览文件 @
a495795c
...
...
@@ -171,7 +171,7 @@ public abstract class FileFont extends PhysicalFont {
}
}
if
(
scaler
!=
null
)
{
scaler
.
dispose
();
scaler
.
dispose
Scaler
();
}
scaler
=
FontScaler
.
getNullScaler
();
}
...
...
src/share/classes/sun/font/FontScaler.java
浏览文件 @
a495795c
...
...
@@ -198,6 +198,12 @@ public abstract class FontScaler implements DisposerRecord {
scaler context objects! */
public
void
dispose
()
{}
/**
* Used when the native resources held by the scaler need
* to be released before the 2D disposer runs.
*/
public
void
disposeScaler
()
{}
/* At the moment these 3 methods are needed for Type1 fonts only.
* For Truetype fonts we extract required info outside of scaler
* on java layer.
...
...
src/share/classes/sun/font/FreetypeFontScaler.java
浏览文件 @
a495795c
...
...
@@ -167,6 +167,9 @@ class FreetypeFontScaler extends FontScaler {
return
getLayoutTableCacheNative
(
nativeScaler
);
}
/* This method should not be called directly, in case
* it is being invoked from a thread with a native context.
*/
public
synchronized
void
dispose
()
{
if
(
nativeScaler
!=
0L
)
{
disposeNativeScaler
(
font
.
get
(),
nativeScaler
);
...
...
@@ -174,6 +177,21 @@ class FreetypeFontScaler extends FontScaler {
}
}
public
synchronized
void
disposeScaler
()
{
if
(
nativeScaler
!=
0L
)
{
/*
* The current thread may be calling this method from the context
* of a JNI up-call. It will hold the native lock from the
* original down-call so can directly enter dispose and free
* the resources. So we need to schedule the disposal to happen
* only once we've returned from native. So by running the dispose
* on another thread which does nothing except that disposal we
* are sure that this is safe.
*/
new
Thread
(
null
,
()
->
dispose
(),
"free scaler"
,
0
).
start
();
}
}
synchronized
int
getNumGlyphs
()
throws
FontScalerException
{
if
(
nativeScaler
!=
0L
)
{
return
getNumGlyphsNative
(
nativeScaler
);
...
...
@@ -210,7 +228,7 @@ class FreetypeFontScaler extends FontScaler {
return
getUnitsPerEMNative
(
nativeScaler
);
}
long
createScalerContext
(
double
[]
matrix
,
synchronized
long
createScalerContext
(
double
[]
matrix
,
int
aa
,
int
fm
,
float
boldness
,
float
italic
,
boolean
disableHinting
)
{
if
(
nativeScaler
!=
0L
)
{
...
...
@@ -240,7 +258,7 @@ class FreetypeFontScaler extends FontScaler {
private
native
GeneralPath
getGlyphVectorOutlineNative
(
Font2D
font
,
long
pScalerContext
,
long
pScaler
,
int
[]
glyphs
,
int
numGlyphs
,
float
x
,
float
y
);
native
Point2D
.
Float
getGlyphPointNative
(
Font2D
font
,
private
native
Point2D
.
Float
getGlyphPointNative
(
Font2D
font
,
long
pScalerContext
,
long
pScaler
,
int
glyphCode
,
int
ptNumber
);
private
native
long
getLayoutTableCacheNative
(
long
pScaler
);
...
...
@@ -253,7 +271,7 @@ class FreetypeFontScaler extends FontScaler {
private
native
long
getUnitsPerEMNative
(
long
pScaler
);
native
long
createScalerContextNative
(
long
pScaler
,
double
[]
matrix
,
private
native
long
createScalerContextNative
(
long
pScaler
,
double
[]
matrix
,
int
aa
,
int
fm
,
float
boldness
,
float
italic
);
/* Freetype scaler context does not contain any pointers that
...
...
src/share/classes/sun/font/GlyphList.java
浏览文件 @
a495795c
...
...
@@ -323,6 +323,14 @@ public final class GlyphList {
*/
public
void
setGlyphIndex
(
int
i
)
{
glyphindex
=
i
;
if
(
images
[
i
]
==
0L
)
{
metrics
[
0
]
=
(
int
)
gposx
;
metrics
[
1
]
=
(
int
)
gposy
;
metrics
[
2
]
=
0
;
metrics
[
3
]
=
0
;
metrics
[
4
]
=
0
;
return
;
}
float
gx
=
StrikeCache
.
unsafe
.
getFloat
(
images
[
i
]+
StrikeCache
.
topLeftXOffset
);
float
gy
=
...
...
@@ -361,6 +369,9 @@ public final class GlyphList {
graybits
=
new
byte
[
len
];
}
}
if
(
images
[
glyphindex
]
==
0L
)
{
return
graybits
;
}
long
pixelDataAddress
=
StrikeCache
.
unsafe
.
getAddress
(
images
[
glyphindex
]
+
StrikeCache
.
pixelDataOffset
);
...
...
@@ -468,6 +479,9 @@ public final class GlyphList {
char
gw
,
gh
;
float
gx
,
gy
,
gx0
,
gy0
,
gx1
,
gy1
;
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
if
(
images
[
i
]
==
0L
)
{
continue
;
}
gx
=
StrikeCache
.
unsafe
.
getFloat
(
images
[
i
]+
xOffset
);
gy
=
StrikeCache
.
unsafe
.
getFloat
(
images
[
i
]+
yOffset
);
gw
=
StrikeCache
.
unsafe
.
getChar
(
images
[
i
]+
wOffset
);
...
...
src/share/classes/sun/java2d/SunGraphics2D.java
浏览文件 @
a495795c
...
...
@@ -3020,7 +3020,8 @@ public final class SunGraphics2D
if
(
data
==
null
)
{
throw
new
NullPointerException
(
"char data is null"
);
}
if
(
offset
<
0
||
length
<
0
||
offset
+
length
>
data
.
length
)
{
if
(
offset
<
0
||
length
<
0
||
offset
+
length
<
length
||
offset
+
length
>
data
.
length
)
{
throw
new
ArrayIndexOutOfBoundsException
(
"bad offset/length"
);
}
if
(
font
.
hasLayoutAttributes
())
{
...
...
@@ -3052,7 +3053,8 @@ public final class SunGraphics2D
if
(
data
==
null
)
{
throw
new
NullPointerException
(
"byte data is null"
);
}
if
(
offset
<
0
||
length
<
0
||
offset
+
length
>
data
.
length
)
{
if
(
offset
<
0
||
length
<
0
||
offset
+
length
<
length
||
offset
+
length
>
data
.
length
)
{
throw
new
ArrayIndexOutOfBoundsException
(
"bad offset/length"
);
}
/* Byte data is interpreted as 8-bit ASCII. Re-use drawChars loops */
...
...
src/share/classes/sun/misc/Launcher.java
浏览文件 @
a495795c
...
...
@@ -85,6 +85,9 @@ public class Launcher {
// Finally, install a security manager if requested
String
s
=
System
.
getProperty
(
"java.security.manager"
);
if
(
s
!=
null
)
{
// init FileSystem machinery before SecurityManager installation
sun
.
nio
.
fs
.
DefaultFileSystemProvider
.
create
();
SecurityManager
sm
=
null
;
if
(
""
.
equals
(
s
)
||
"default"
.
equals
(
s
))
{
sm
=
new
java
.
lang
.
SecurityManager
();
...
...
src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
浏览文件 @
a495795c
...
...
@@ -2145,6 +2145,10 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
}
while
(
retryTunnel
<
maxRedirects
);
if
(
retryTunnel
>=
maxRedirects
||
(
respCode
!=
HTTP_OK
))
{
if
(
respCode
!=
HTTP_PROXY_AUTH
)
{
// remove all but authenticate responses
responses
.
reset
();
}
throw
new
IOException
(
"Unable to tunnel through proxy."
+
" Proxy returns \""
+
statusLine
+
"\""
);
...
...
src/share/classes/sun/net/www/protocol/jar/Handler.java
浏览文件 @
a495795c
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
9
, 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
...
...
@@ -121,6 +121,13 @@ public class Handler extends java.net.URLStreamHandler {
return
h
;
}
public
String
checkNestedProtocol
(
String
spec
)
{
if
(
spec
.
regionMatches
(
true
,
0
,
"jar:"
,
0
,
4
))
{
return
"Nested JAR URLs are not supported"
;
}
else
{
return
null
;
}
}
@Override
@SuppressWarnings
(
"deprecation"
)
...
...
@@ -147,6 +154,12 @@ public class Handler extends java.net.URLStreamHandler {
}
spec
=
spec
.
substring
(
start
,
limit
);
String
exceptionMessage
=
checkNestedProtocol
(
spec
);
if
(
exceptionMessage
!=
null
)
{
// NPE will be transformed into MalformedURLException by the caller
throw
new
NullPointerException
(
exceptionMessage
);
}
if
(
absoluteSpec
)
{
file
=
parseAbsoluteSpec
(
spec
);
}
else
if
(!
refOnly
)
{
...
...
src/share/classes/sun/rmi/registry/RegistryImpl_Skel.java
浏览文件 @
a495795c
...
...
@@ -27,13 +27,8 @@
package
sun.rmi.registry
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.rmi.AccessException
;
import
java.rmi.server.RemoteCall
;
import
sun.rmi.transport.Connection
;
import
sun.rmi.transport.StreamRemoteCall
;
import
sun.rmi.transport.tcp.TCPConnection
;
/**
* Skeleton to dispatch RegistryImpl methods.
...
...
@@ -56,7 +51,7 @@ public final class RegistryImpl_Skel
return
operations
.
clone
();
}
public
void
dispatch
(
java
.
rmi
.
Remote
obj
,
java
.
rmi
.
server
.
RemoteCall
c
all
,
int
opnum
,
long
hash
)
public
void
dispatch
(
java
.
rmi
.
Remote
obj
,
java
.
rmi
.
server
.
RemoteCall
remoteC
all
,
int
opnum
,
long
hash
)
throws
java
.
lang
.
Exception
{
if
(
opnum
<
0
)
{
if
(
hash
==
7583982177005850366L
)
{
...
...
@@ -78,6 +73,7 @@ public final class RegistryImpl_Skel
}
sun
.
rmi
.
registry
.
RegistryImpl
server
=
(
sun
.
rmi
.
registry
.
RegistryImpl
)
obj
;
StreamRemoteCall
call
=
(
StreamRemoteCall
)
remoteCall
;
switch
(
opnum
)
{
case
0
:
// bind(String, Remote)
{
...
...
@@ -90,7 +86,8 @@ public final class RegistryImpl_Skel
java
.
io
.
ObjectInput
in
=
call
.
getInputStream
();
$param_String_1
=
(
java
.
lang
.
String
)
in
.
readObject
();
$param_Remote_2
=
(
java
.
rmi
.
Remote
)
in
.
readObject
();
}
catch
(
java
.
io
.
IOException
|
java
.
lang
.
ClassNotFoundException
e
)
{
}
catch
(
ClassCastException
|
IOException
|
ClassNotFoundException
e
)
{
call
.
discardPendingRefs
();
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling arguments"
,
e
);
}
finally
{
call
.
releaseInputStream
();
...
...
@@ -123,7 +120,8 @@ public final class RegistryImpl_Skel
try
{
java
.
io
.
ObjectInput
in
=
call
.
getInputStream
();
$param_String_1
=
(
java
.
lang
.
String
)
in
.
readObject
();
}
catch
(
java
.
io
.
IOException
|
java
.
lang
.
ClassNotFoundException
e
)
{
}
catch
(
ClassCastException
|
IOException
|
ClassNotFoundException
e
)
{
call
.
discardPendingRefs
();
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling arguments"
,
e
);
}
finally
{
call
.
releaseInputStream
();
...
...
@@ -149,7 +147,8 @@ public final class RegistryImpl_Skel
java
.
io
.
ObjectInput
in
=
call
.
getInputStream
();
$param_String_1
=
(
java
.
lang
.
String
)
in
.
readObject
();
$param_Remote_2
=
(
java
.
rmi
.
Remote
)
in
.
readObject
();
}
catch
(
java
.
io
.
IOException
|
java
.
lang
.
ClassNotFoundException
e
)
{
}
catch
(
ClassCastException
|
IOException
|
java
.
lang
.
ClassNotFoundException
e
)
{
call
.
discardPendingRefs
();
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling arguments"
,
e
);
}
finally
{
call
.
releaseInputStream
();
...
...
@@ -172,7 +171,8 @@ public final class RegistryImpl_Skel
try
{
java
.
io
.
ObjectInput
in
=
call
.
getInputStream
();
$param_String_1
=
(
java
.
lang
.
String
)
in
.
readObject
();
}
catch
(
java
.
io
.
IOException
|
java
.
lang
.
ClassNotFoundException
e
)
{
}
catch
(
ClassCastException
|
IOException
|
ClassNotFoundException
e
)
{
call
.
discardPendingRefs
();
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling arguments"
,
e
);
}
finally
{
call
.
releaseInputStream
();
...
...
src/share/classes/sun/rmi/registry/RegistryImpl_Stub.java
浏览文件 @
a495795c
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017,
2019,
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
...
...
@@ -24,6 +24,11 @@
*/
package
sun.rmi.registry
;
import
java.io.IOException
;
import
sun.rmi.transport.StreamRemoteCall
;
/**
* Stubs to invoke RegistryImpl remote methods.
* Originally generated from RMIC but frozen to match RegistryImpl_Skel.
...
...
@@ -57,7 +62,7 @@ public final class RegistryImpl_Stub
public
void
bind
(
java
.
lang
.
String
$param_String_1
,
java
.
rmi
.
Remote
$param_Remote_2
)
throws
java
.
rmi
.
AccessException
,
java
.
rmi
.
AlreadyBoundException
,
java
.
rmi
.
RemoteException
{
try
{
java
.
rmi
.
server
.
RemoteCall
call
=
ref
.
newCall
((
java
.
rmi
.
server
.
RemoteObject
)
this
,
operations
,
0
,
interfaceHash
);
StreamRemoteCall
call
=
(
StreamRemoteCall
)
ref
.
newCall
(
this
,
operations
,
0
,
interfaceHash
);
try
{
java
.
io
.
ObjectOutput
out
=
call
.
getOutputStream
();
out
.
writeObject
(
$param_String_1
);
...
...
@@ -82,15 +87,14 @@ public final class RegistryImpl_Stub
public
java
.
lang
.
String
[]
list
()
throws
java
.
rmi
.
AccessException
,
java
.
rmi
.
RemoteException
{
try
{
java
.
rmi
.
server
.
RemoteCall
call
=
ref
.
newCall
((
java
.
rmi
.
server
.
RemoteObject
)
this
,
operations
,
1
,
interfaceHash
);
StreamRemoteCall
call
=
(
StreamRemoteCall
)
ref
.
newCall
(
this
,
operations
,
1
,
interfaceHash
);
ref
.
invoke
(
call
);
java
.
lang
.
String
[]
$result
;
try
{
java
.
io
.
ObjectInput
in
=
call
.
getInputStream
();
$result
=
(
java
.
lang
.
String
[])
in
.
readObject
();
}
catch
(
java
.
io
.
IOException
e
)
{
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling return"
,
e
);
}
catch
(
java
.
lang
.
ClassNotFoundException
e
)
{
}
catch
(
ClassCastException
|
IOException
|
ClassNotFoundException
e
)
{
call
.
discardPendingRefs
();
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling return"
,
e
);
}
finally
{
ref
.
done
(
call
);
...
...
@@ -109,7 +113,7 @@ public final class RegistryImpl_Stub
public
java
.
rmi
.
Remote
lookup
(
java
.
lang
.
String
$param_String_1
)
throws
java
.
rmi
.
AccessException
,
java
.
rmi
.
NotBoundException
,
java
.
rmi
.
RemoteException
{
try
{
java
.
rmi
.
server
.
RemoteCall
call
=
ref
.
newCall
((
java
.
rmi
.
server
.
RemoteObject
)
this
,
operations
,
2
,
interfaceHash
);
StreamRemoteCall
call
=
(
StreamRemoteCall
)
ref
.
newCall
(
this
,
operations
,
2
,
interfaceHash
);
try
{
java
.
io
.
ObjectOutput
out
=
call
.
getOutputStream
();
out
.
writeObject
(
$param_String_1
);
...
...
@@ -121,9 +125,8 @@ public final class RegistryImpl_Stub
try
{
java
.
io
.
ObjectInput
in
=
call
.
getInputStream
();
$result
=
(
java
.
rmi
.
Remote
)
in
.
readObject
();
}
catch
(
java
.
io
.
IOException
e
)
{
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling return"
,
e
);
}
catch
(
java
.
lang
.
ClassNotFoundException
e
)
{
}
catch
(
ClassCastException
|
IOException
|
ClassNotFoundException
e
)
{
call
.
discardPendingRefs
();
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling return"
,
e
);
}
finally
{
ref
.
done
(
call
);
...
...
@@ -144,7 +147,7 @@ public final class RegistryImpl_Stub
public
void
rebind
(
java
.
lang
.
String
$param_String_1
,
java
.
rmi
.
Remote
$param_Remote_2
)
throws
java
.
rmi
.
AccessException
,
java
.
rmi
.
RemoteException
{
try
{
java
.
rmi
.
server
.
RemoteCall
call
=
ref
.
newCall
((
java
.
rmi
.
server
.
RemoteObject
)
this
,
operations
,
3
,
interfaceHash
);
StreamRemoteCall
call
=
(
StreamRemoteCall
)
ref
.
newCall
(
this
,
operations
,
3
,
interfaceHash
);
try
{
java
.
io
.
ObjectOutput
out
=
call
.
getOutputStream
();
out
.
writeObject
(
$param_String_1
);
...
...
@@ -167,7 +170,7 @@ public final class RegistryImpl_Stub
public
void
unbind
(
java
.
lang
.
String
$param_String_1
)
throws
java
.
rmi
.
AccessException
,
java
.
rmi
.
NotBoundException
,
java
.
rmi
.
RemoteException
{
try
{
java
.
rmi
.
server
.
RemoteCall
call
=
ref
.
newCall
((
java
.
rmi
.
server
.
RemoteObject
)
this
,
operations
,
4
,
interfaceHash
);
StreamRemoteCall
call
=
(
StreamRemoteCall
)
ref
.
newCall
(
this
,
operations
,
4
,
interfaceHash
);
try
{
java
.
io
.
ObjectOutput
out
=
call
.
getOutputStream
();
out
.
writeObject
(
$param_String_1
);
...
...
src/share/classes/sun/rmi/transport/DGCImpl_Skel.java
浏览文件 @
a495795c
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017,
2019,
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
...
...
@@ -25,6 +25,8 @@
package
sun.rmi.transport
;
import
java.io.IOException
;
/**
* Skeleton to dispatch DGC methods.
* Originally generated by RMIC but frozen to match the stubs.
...
...
@@ -43,12 +45,13 @@ public final class DGCImpl_Skel
return
operations
.
clone
();
}
public
void
dispatch
(
java
.
rmi
.
Remote
obj
,
java
.
rmi
.
server
.
RemoteCall
c
all
,
int
opnum
,
long
hash
)
public
void
dispatch
(
java
.
rmi
.
Remote
obj
,
java
.
rmi
.
server
.
RemoteCall
remoteC
all
,
int
opnum
,
long
hash
)
throws
java
.
lang
.
Exception
{
if
(
hash
!=
interfaceHash
)
throw
new
java
.
rmi
.
server
.
SkeletonMismatchException
(
"interface hash mismatch"
);
sun
.
rmi
.
transport
.
DGCImpl
server
=
(
sun
.
rmi
.
transport
.
DGCImpl
)
obj
;
StreamRemoteCall
call
=
(
StreamRemoteCall
)
remoteCall
;
switch
(
opnum
)
{
case
0
:
// clean(ObjID[], long, VMID, boolean)
{
...
...
@@ -62,9 +65,8 @@ public final class DGCImpl_Skel
$param_long_2
=
in
.
readLong
();
$param_VMID_3
=
(
java
.
rmi
.
dgc
.
VMID
)
in
.
readObject
();
$param_boolean_4
=
in
.
readBoolean
();
}
catch
(
java
.
io
.
IOException
e
)
{
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling arguments"
,
e
);
}
catch
(
java
.
lang
.
ClassNotFoundException
e
)
{
}
catch
(
ClassCastException
|
IOException
|
ClassNotFoundException
e
)
{
call
.
discardPendingRefs
();
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling arguments"
,
e
);
}
finally
{
call
.
releaseInputStream
();
...
...
@@ -88,9 +90,8 @@ public final class DGCImpl_Skel
$param_arrayOf_ObjID_1
=
(
java
.
rmi
.
server
.
ObjID
[])
in
.
readObject
();
$param_long_2
=
in
.
readLong
();
$param_Lease_3
=
(
java
.
rmi
.
dgc
.
Lease
)
in
.
readObject
();
}
catch
(
java
.
io
.
IOException
e
)
{
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling arguments"
,
e
);
}
catch
(
java
.
lang
.
ClassNotFoundException
e
)
{
}
catch
(
ClassCastException
|
IOException
|
ClassNotFoundException
e
)
{
call
.
discardPendingRefs
();
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling arguments"
,
e
);
}
finally
{
call
.
releaseInputStream
();
...
...
src/share/classes/sun/rmi/transport/DGCImpl_Stub.java
浏览文件 @
a495795c
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017,
2019,
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
...
...
@@ -25,16 +25,15 @@
package
sun.rmi.transport
;
import
java.io.ObjectInputStream
;
import
sun.rmi.transport.tcp.TCPConnection
;
import
java.io.IOException
;
import
java.rmi.dgc.Lease
;
import
java.rmi.dgc.VMID
;
import
java.rmi.server.UID
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.util.ArrayList
;
import
sun.misc.ObjectInputFilter
;
import
sun.rmi.server.UnicastRef
;
import
sun.rmi.transport.tcp.TCPConnection
;
/**
* Stubs to invoke DGC remote methods.
...
...
@@ -72,7 +71,9 @@ public final class DGCImpl_Stub
public
void
clean
(
java
.
rmi
.
server
.
ObjID
[]
$param_arrayOf_ObjID_1
,
long
$param_long_2
,
java
.
rmi
.
dgc
.
VMID
$param_VMID_3
,
boolean
$param_boolean_4
)
throws
java
.
rmi
.
RemoteException
{
try
{
java
.
rmi
.
server
.
RemoteCall
call
=
ref
.
newCall
((
java
.
rmi
.
server
.
RemoteObject
)
this
,
operations
,
0
,
interfaceHash
);
StreamRemoteCall
call
=
(
StreamRemoteCall
)
ref
.
newCall
((
java
.
rmi
.
server
.
RemoteObject
)
this
,
operations
,
0
,
interfaceHash
);
call
.
setObjectInputFilter
(
DGCImpl_Stub:
:
leaseFilter
);
try
{
java
.
io
.
ObjectOutput
out
=
call
.
getOutputStream
();
out
.
writeObject
(
$param_arrayOf_ObjID_1
);
...
...
@@ -97,7 +98,10 @@ public final class DGCImpl_Stub
public
java
.
rmi
.
dgc
.
Lease
dirty
(
java
.
rmi
.
server
.
ObjID
[]
$param_arrayOf_ObjID_1
,
long
$param_long_2
,
java
.
rmi
.
dgc
.
Lease
$param_Lease_3
)
throws
java
.
rmi
.
RemoteException
{
try
{
java
.
rmi
.
server
.
RemoteCall
call
=
ref
.
newCall
((
java
.
rmi
.
server
.
RemoteObject
)
this
,
operations
,
1
,
interfaceHash
);
StreamRemoteCall
call
=
(
StreamRemoteCall
)
ref
.
newCall
((
java
.
rmi
.
server
.
RemoteObject
)
this
,
operations
,
1
,
interfaceHash
);
call
.
setObjectInputFilter
(
DGCImpl_Stub:
:
leaseFilter
);
try
{
java
.
io
.
ObjectOutput
out
=
call
.
getOutputStream
();
out
.
writeObject
(
$param_arrayOf_ObjID_1
);
...
...
@@ -108,26 +112,17 @@ public final class DGCImpl_Stub
}
ref
.
invoke
(
call
);
java
.
rmi
.
dgc
.
Lease
$result
;
Connection
connection
=
((
StreamRemoteCall
)
call
)
.
getConnection
();
Connection
connection
=
call
.
getConnection
();
try
{
java
.
io
.
ObjectInput
in
=
call
.
getInputStream
();
if
(
in
instanceof
ObjectInputStream
)
{
/**
* Set a filter on the stream for the return value.
*/
ObjectInputStream
ois
=
(
ObjectInputStream
)
in
;
AccessController
.
doPrivileged
((
PrivilegedAction
<
Void
>)()
->
{
ObjectInputFilter
.
Config
.
setObjectInputFilter
(
ois
,
DGCImpl_Stub:
:
leaseFilter
);
return
null
;
});
}
$result
=
(
java
.
rmi
.
dgc
.
Lease
)
in
.
readObject
();
}
catch
(
java
.
io
.
IOException
|
java
.
lang
.
ClassNotFoundException
e
)
{
}
catch
(
ClassCastException
|
IOException
|
ClassNotFoundException
e
)
{
if
(
connection
instanceof
TCPConnection
)
{
// Modified to prevent re-use of the connection after an exception
((
TCPConnection
)
connection
).
getChannel
().
free
(
connection
,
false
);
}
call
.
discardPendingRefs
();
throw
new
java
.
rmi
.
UnmarshalException
(
"error unmarshalling return"
,
e
);
}
finally
{
ref
.
done
(
call
);
...
...
@@ -146,6 +141,10 @@ public final class DGCImpl_Stub
* ObjectInputFilter to filter DGCClient return value (a Lease).
* The list of acceptable classes is very short and explicit.
* The depth and array sizes are limited.
* <p>
* The filter must accept normal and exception returns.
* A DGC server may throw exceptions that may have a cause
* and suppressed exceptions.
*
* @param filterInfo access to class, arrayLength, etc.
* @return {@link ObjectInputFilter.Status#ALLOWED} if allowed,
...
...
@@ -172,7 +171,16 @@ public final class DGCImpl_Stub
}
return
(
clazz
==
UID
.
class
||
clazz
==
VMID
.
class
||
clazz
==
Lease
.
class
)
clazz
==
Lease
.
class
||
(
Throwable
.
class
.
isAssignableFrom
(
clazz
)
&&
clazz
.
getClassLoader
()
==
Object
.
class
.
getClassLoader
())
||
clazz
==
StackTraceElement
.
class
||
clazz
==
ArrayList
.
class
||
// for suppressed exceptions, if any
clazz
==
Object
.
class
||
clazz
.
getName
().
equals
(
"java.util.Collections$UnmodifiableList"
)
||
clazz
.
getName
().
equals
(
"java.util.Collections$UnmodifiableCollection"
)
||
clazz
.
getName
().
equals
(
"java.util.Collections$UnmodifiableRandomAccessList"
))
?
ObjectInputFilter
.
Status
.
ALLOWED
:
ObjectInputFilter
.
Status
.
REJECTED
;
}
...
...
src/share/classes/sun/rmi/transport/StreamRemoteCall.java
浏览文件 @
a495795c
/*
* Copyright (c) 1996, 201
7
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 201
9
, 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
...
...
@@ -36,6 +36,10 @@ import java.rmi.MarshalException;
import
java.rmi.UnmarshalException
;
import
java.rmi.server.ObjID
;
import
java.rmi.server.RemoteCall
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
sun.misc.ObjectInputFilter
;
import
sun.rmi.runtime.Log
;
import
sun.rmi.server.UnicastRef
;
import
sun.rmi.transport.tcp.TCPEndpoint
;
...
...
@@ -50,6 +54,7 @@ public class StreamRemoteCall implements RemoteCall {
private
ConnectionInputStream
in
=
null
;
private
ConnectionOutputStream
out
=
null
;
private
Connection
conn
;
private
ObjectInputFilter
filter
=
null
;
private
boolean
resultStarted
=
false
;
private
Exception
serverException
=
null
;
...
...
@@ -123,6 +128,13 @@ public class StreamRemoteCall implements RemoteCall {
}
}
public
void
setObjectInputFilter
(
ObjectInputFilter
filter
)
{
if
(
in
!=
null
)
{
throw
new
IllegalStateException
(
"set filter must occur before calling getInputStream"
);
}
this
.
filter
=
filter
;
}
/**
* Get the InputStream the stub/skeleton should get results/arguments
* from.
...
...
@@ -132,6 +144,12 @@ public class StreamRemoteCall implements RemoteCall {
Transport
.
transportLog
.
log
(
Log
.
VERBOSE
,
"getting input stream"
);
in
=
new
ConnectionInputStream
(
conn
.
getInputStream
());
if
(
filter
!=
null
)
{
AccessController
.
doPrivileged
((
PrivilegedAction
<
Void
>)
()
->
{
ObjectInputFilter
.
Config
.
setObjectInputFilter
(
in
,
filter
);
return
null
;
});
}
}
return
in
;
}
...
...
@@ -251,6 +269,7 @@ public class StreamRemoteCall implements RemoteCall {
try
{
ex
=
in
.
readObject
();
}
catch
(
Exception
e
)
{
discardPendingRefs
();
throw
new
UnmarshalException
(
"Error unmarshaling return"
,
e
);
}
...
...
@@ -259,6 +278,7 @@ public class StreamRemoteCall implements RemoteCall {
if
(
ex
instanceof
Exception
)
{
exceptionReceivedFromServer
((
Exception
)
ex
);
}
else
{
discardPendingRefs
();
throw
new
UnmarshalException
(
"Return type not Exception"
);
}
// Exception is thrown before fallthrough can occur
...
...
src/share/classes/sun/security/jgss/krb5/Krb5Context.java
浏览文件 @
a495795c
/*
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
9
, 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
...
...
@@ -614,6 +614,8 @@ class Krb5Context implements GSSContextSpi {
if
(
myCred
==
null
)
{
myCred
=
Krb5InitCredential
.
getInstance
(
caller
,
myName
,
GSSCredential
.
DEFAULT_LIFETIME
);
myCred
=
Krb5ProxyCredential
.
tryImpersonation
(
caller
,
(
Krb5InitCredential
)
myCred
);
}
else
if
(!
myCred
.
isInitiatorCredential
())
{
throw
new
GSSException
(
errorCode
,
-
1
,
"No TGT available"
);
...
...
@@ -651,8 +653,8 @@ class Krb5Context implements GSSContextSpi {
// highly consider just calling:
// Subject.getSubject
// SubjectComber.find
// instead of Krb5Util.getTicket
return
Krb5Util
.
getTicket
(
// instead of Krb5Util.get
Service
Ticket
return
Krb5Util
.
get
Service
Ticket
(
GSSCaller
.
CALLER_UNKNOWN
,
// since it's useSubjectCredsOnly here,
// don't worry about the null
...
...
src/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java
浏览文件 @
a495795c
/*
* Copyright (c) 2000, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
9
, 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
...
...
@@ -55,6 +55,7 @@ public class Krb5InitCredential
private
Krb5NameElement
name
;
private
Credentials
krb5Credentials
;
public
KerberosTicket
proxyTicket
;
private
Krb5InitCredential
(
Krb5NameElement
name
,
byte
[]
asn1Encoding
,
...
...
@@ -153,7 +154,7 @@ public class Krb5InitCredential
Krb5MechFactory
.
NT_GSS_KRB5_PRINCIPAL
);
}
return
new
Krb5InitCredential
(
name
,
Krb5InitCredential
result
=
new
Krb5InitCredential
(
name
,
tgt
.
getEncoded
(),
tgt
.
getClient
(),
tgt
.
getServer
(),
...
...
@@ -165,6 +166,9 @@ public class Krb5InitCredential
tgt
.
getEndTime
(),
tgt
.
getRenewTill
(),
tgt
.
getClientAddresses
());
result
.
proxyTicket
=
KerberosSecrets
.
getJavaxSecurityAuthKerberosAccess
().
kerberosTicketGetProxy
(
tgt
);
return
result
;
}
static
Krb5InitCredential
getInstance
(
Krb5NameElement
name
,
...
...
@@ -334,9 +338,9 @@ public class Krb5InitCredential
public
KerberosTicket
run
()
throws
Exception
{
// It's OK to use null as serverPrincipal. TGT is almost
// the first ticket for a principal and we use list.
return
Krb5Util
.
getTicket
(
return
Krb5Util
.
get
Initial
Ticket
(
realCaller
,
clientPrincipal
,
null
,
acc
);
clientPrincipal
,
acc
);
}});
}
catch
(
PrivilegedActionException
e
)
{
GSSException
ge
=
...
...
src/share/classes/sun/security/jgss/krb5/Krb5MechFactory.java
浏览文件 @
a495795c
/*
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
9
, 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
...
...
@@ -120,6 +120,8 @@ public final class Krb5MechFactory implements MechanismFactory {
usage
==
GSSCredential
.
INITIATE_AND_ACCEPT
)
{
credElement
=
Krb5InitCredential
.
getInstance
(
caller
,
(
Krb5NameElement
)
name
,
initLifetime
);
credElement
=
Krb5ProxyCredential
.
tryImpersonation
(
caller
,
(
Krb5InitCredential
)
credElement
);
checkInitCredPermission
((
Krb5NameElement
)
credElement
.
getName
());
}
else
if
(
usage
==
GSSCredential
.
ACCEPT_ONLY
)
{
...
...
src/share/classes/sun/security/jgss/krb5/Krb5NameElement.java
浏览文件 @
a495795c
/*
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
9
, 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
...
...
@@ -144,7 +144,7 @@ public class Krb5NameElement
return
new
Krb5NameElement
(
principalName
,
gssNameStr
,
gssNameType
);
}
static
Krb5NameElement
getInstance
(
PrincipalName
principalName
)
{
public
static
Krb5NameElement
getInstance
(
PrincipalName
principalName
)
{
return
new
Krb5NameElement
(
principalName
,
principalName
.
getName
(),
Krb5MechFactory
.
NT_GSS_KRB5_PRINCIPAL
);
...
...
src/share/classes/sun/security/jgss/krb5/Krb5ProxyCredential.java
浏览文件 @
a495795c
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012,
2019,
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
...
...
@@ -26,10 +26,17 @@
package
sun.security.jgss.krb5
;
import
org.ietf.jgss.*
;
import
sun.security.jgss.GSSCaller
;
import
sun.security.jgss.spi.*
;
import
java.util.Date
;
import
java.io.IOException
;
import
sun.security.krb5.Credentials
;
import
sun.security.krb5.KrbException
;
import
sun.security.krb5.internal.Ticket
;
import
javax.security.auth.kerberos.KerberosTicket
;
/**
* Implements the krb5 proxy credential element used in constrained
* delegation. It is used in both impersonation (where there is no Kerberos 5
...
...
@@ -112,4 +119,24 @@ public class Krb5ProxyCredential
throw
new
GSSException
(
GSSException
.
FAILURE
,
-
1
,
"Only an initiate credentials can impersonate"
);
}
// Try to see if a default credential should act as an impersonator.
static
Krb5CredElement
tryImpersonation
(
GSSCaller
caller
,
Krb5InitCredential
initiator
)
throws
GSSException
{
try
{
KerberosTicket
proxy
=
initiator
.
proxyTicket
;
if
(
proxy
!=
null
)
{
Credentials
proxyCreds
=
Krb5Util
.
ticketToCreds
(
proxy
);
return
new
Krb5ProxyCredential
(
initiator
,
Krb5NameElement
.
getInstance
(
proxyCreds
.
getClient
()),
proxyCreds
.
getTicket
());
}
else
{
return
initiator
;
}
}
catch
(
KrbException
|
IOException
e
)
{
throw
new
GSSException
(
GSSException
.
DEFECTIVE_CREDENTIAL
,
-
1
,
"Cannot create proxy credential"
);
}
}
}
src/share/classes/sun/security/jgss/krb5/Krb5Util.java
浏览文件 @
a495795c
/*
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
9
, 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
...
...
@@ -139,25 +139,42 @@ public class Krb5Util {
/**
* Retrieves the ticket corresponding to the client/server principal
* pair from the Subject in the specified AccessControlContext.
*/
static
KerberosTicket
getServiceTicket
(
GSSCaller
caller
,
String
clientPrincipal
,
String
serverPrincipal
,
AccessControlContext
acc
)
throws
LoginException
{
// Try to get ticket from acc's Subject
Subject
accSubj
=
Subject
.
getSubject
(
acc
);
KerberosTicket
ticket
=
SubjectComber
.
find
(
accSubj
,
serverPrincipal
,
clientPrincipal
,
KerberosTicket
.
class
);
return
ticket
;
}
/**
* Retrieves the initial TGT corresponding to the client principal
* from the Subject in the specified AccessControlContext.
* If the ticket can not be found in the Subject, and if
* useSubjectCredsOnly is false, then obtain ticket from
* a LoginContext.
*/
static
KerberosTicket
getTicket
(
GSSCaller
caller
,
String
clientPrincipal
,
String
server
Principal
,
static
KerberosTicket
get
Initial
Ticket
(
GSSCaller
caller
,
String
client
Principal
,
AccessControlContext
acc
)
throws
LoginException
{
// Try to get ticket from acc's Subject
Subject
accSubj
=
Subject
.
getSubject
(
acc
);
KerberosTicket
ticket
=
SubjectComber
.
find
(
accSubj
,
serverPrincipa
l
,
clientPrincipal
,
SubjectComber
.
find
(
accSubj
,
nul
l
,
clientPrincipal
,
KerberosTicket
.
class
);
// Try to get ticket from Subject obtained from GSSUtil
if
(
ticket
==
null
&&
!
GSSUtil
.
useSubjectCredsOnly
(
caller
))
{
Subject
subject
=
GSSUtil
.
login
(
caller
,
GSSUtil
.
GSS_KRB5_MECH_OID
);
ticket
=
SubjectComber
.
find
(
subject
,
serverPrincipa
l
,
clientPrincipal
,
KerberosTicket
.
class
);
nul
l
,
clientPrincipal
,
KerberosTicket
.
class
);
}
return
ticket
;
}
...
...
src/share/classes/sun/security/krb5/Credentials.java
浏览文件 @
a495795c
/*
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
9
, 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
...
...
@@ -56,13 +56,23 @@ public class Credentials {
KerberosTime
endTime
;
KerberosTime
renewTill
;
HostAddresses
cAddr
;
EncryptionKey
serviceKey
;
AuthorizationData
authzData
;
private
static
boolean
DEBUG
=
Krb5
.
DEBUG
;
private
static
CredentialsCache
cache
;
static
boolean
alreadyLoaded
=
false
;
private
static
boolean
alreadyTried
=
false
;
private
Credentials
proxy
=
null
;
public
Credentials
getProxy
()
{
return
proxy
;
}
public
Credentials
setProxy
(
Credentials
proxy
)
{
this
.
proxy
=
proxy
;
return
this
;
}
// Read native ticket with session key type in the given list
private
static
native
Credentials
acquireDefaultNativeCreds
(
int
[]
eTypes
);
...
...
@@ -336,20 +346,19 @@ public class Credentials {
return
null
;
}
sun
.
security
.
krb5
.
internal
.
ccache
.
Credentials
tgtCred
=
ccache
.
getDefaultCreds
();
Credentials
tgtCred
=
ccache
.
getInitialCreds
();
if
(
tgtCred
==
null
)
{
return
null
;
}
if
(
EType
.
isSupported
(
tgtCred
.
getEType
()))
{
return
tgtCred
.
setKrbCreds
()
;
if
(
EType
.
isSupported
(
tgtCred
.
key
.
getEType
()))
{
return
tgtCred
;
}
else
{
if
(
DEBUG
)
{
System
.
out
.
println
(
">>> unsupported key type found the default TGT: "
+
tgtCred
.
getEType
());
tgtCred
.
key
.
getEType
());
}
return
null
;
}
...
...
@@ -384,20 +393,19 @@ public class Credentials {
cache
=
CredentialsCache
.
getInstance
();
}
if
(
cache
!=
null
)
{
sun
.
security
.
krb5
.
internal
.
ccache
.
Credentials
temp
=
cache
.
getDefaultCreds
();
Credentials
temp
=
cache
.
getInitialCreds
();
if
(
temp
!=
null
)
{
if
(
DEBUG
)
{
System
.
out
.
println
(
">>> KrbCreds found the default ticket"
+
" granting ticket in credential cache."
);
}
if
(
EType
.
isSupported
(
temp
.
getEType
()))
{
result
=
temp
.
setKrbCreds
()
;
if
(
EType
.
isSupported
(
temp
.
key
.
getEType
()))
{
result
=
temp
;
}
else
{
if
(
DEBUG
)
{
System
.
out
.
println
(
">>> unsupported key type found the default TGT: "
+
temp
.
getEType
());
temp
.
key
.
getEType
());
}
}
}
...
...
@@ -474,10 +482,6 @@ public class Credentials {
return
cache
;
}
public
EncryptionKey
getServiceKey
()
{
return
serviceKey
;
}
/*
* Prints out debug info.
*/
...
...
src/share/classes/sun/security/krb5/JavaxSecurityAuthKerberosAccess.java
浏览文件 @
a495795c
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
9
, 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
...
...
@@ -25,9 +25,8 @@
package
sun.security.krb5
;
import
javax.security.auth.kerberos.KerberosTicket
;
import
javax.security.auth.kerberos.KeyTab
;
import
sun.security.krb5.EncryptionKey
;
import
sun.security.krb5.PrincipalName
;
/**
* An unsafe tunnel to get non-public access to classes in the
...
...
@@ -39,4 +38,14 @@ public interface JavaxSecurityAuthKerberosAccess {
*/
public
sun
.
security
.
krb5
.
internal
.
ktab
.
KeyTab
keyTabTakeSnapshot
(
KeyTab
ktab
);
/**
* Returns the proxy for a KerberosTicket.
*/
public
KerberosTicket
kerberosTicketGetProxy
(
KerberosTicket
t
);
/**
* Sets the proxy for a KerberosTicket.
*/
public
void
kerberosTicketSetProxy
(
KerberosTicket
t
,
KerberosTicket
p
);
}
src/share/classes/sun/security/krb5/Realm.java
浏览文件 @
a495795c
...
...
@@ -188,7 +188,6 @@ public class Realm implements Cloneable {
return
false
;
for
(
int
i
=
0
;
i
<
name
.
length
();
i
++)
{
if
(
name
.
charAt
(
i
)
==
'/'
||
name
.
charAt
(
i
)
==
':'
||
name
.
charAt
(
i
)
==
'\0'
)
{
return
false
;
}
...
...
src/share/classes/sun/security/krb5/internal/ccache/CCacheInputStream.java
浏览文件 @
a495795c
...
...
@@ -325,16 +325,13 @@ public class CCacheInputStream extends KrbDataInputStream implements FileCCacheC
}
/**
* Reads the next cred in stream.
* @return the next cred
, null if ticket or second_ticket
unparseable.
* Reads the next cred
or config entry
in stream.
* @return the next cred
or config entry, null if data
unparseable.
*
* Note: MIT krb5 1.8.1 might generate a config entry with server principal
* X-CACHECONF:/krb5_ccache_conf_data/fast_avail/krbtgt/REALM@REALM. The
* entry is used by KDC to inform the client that it support certain
* features. Its ticket is not a valid krb5 ticket and thus this method
* returns null.
* When data is unparseable, this method makes sure the correct number of
* bytes are consumed so it's safe to start reading the next element.
*/
Credentials
readCred
(
int
version
)
throws
IOException
,
RealmException
,
KrbApErrException
,
Asn1Exception
{
Object
readCred
(
int
version
)
throws
IOException
,
RealmException
,
KrbApErrException
,
Asn1Exception
{
PrincipalName
cpname
=
null
;
try
{
cpname
=
readPrincipal
(
version
);
...
...
@@ -396,12 +393,23 @@ public class CCacheInputStream extends KrbDataInputStream implements FileCCacheC
}
try
{
if
(
spname
.
getRealmString
().
equals
(
"X-CACHECONF:"
))
{
String
[]
nameParts
=
spname
.
getNameStrings
();
if
(
nameParts
[
0
].
equals
(
"krb5_ccache_conf_data"
))
{
return
new
CredentialsCache
.
ConfigEntry
(
nameParts
[
1
],
nameParts
.
length
>
2
?
new
PrincipalName
(
nameParts
[
2
])
:
null
,
ticketData
);
}
}
return
new
Credentials
(
cpname
,
spname
,
key
,
authtime
,
starttime
,
endtime
,
renewTill
,
skey
,
tFlags
,
addrs
,
auData
,
ticketData
!=
null
?
new
Ticket
(
ticketData
)
:
null
,
ticketData2
!=
null
?
new
Ticket
(
ticketData2
)
:
null
);
}
catch
(
Exception
e
)
{
// If any of new Ticket(*) fails.
if
(
DEBUG
)
{
e
.
printStackTrace
(
System
.
out
);
}
return
null
;
}
}
...
...
src/share/classes/sun/security/krb5/internal/ccache/CCacheOutputStream.java
浏览文件 @
a495795c
...
...
@@ -31,7 +31,6 @@
package
sun.security.krb5.internal.ccache
;
import
java.io.IOException
;
import
java.io.FileOutputStream
;
import
java.io.OutputStream
;
import
sun.security.krb5.internal.util.KrbDataOutputStream
;
import
sun.security.krb5.*
;
...
...
@@ -98,6 +97,21 @@ public class CCacheOutputStream extends KrbDataOutputStream implements FileCCach
writeTicket
(
creds
.
secondTicket
);
}
public
void
addConfigEntry
(
PrincipalName
cname
,
CredentialsCache
.
ConfigEntry
e
)
throws
IOException
{
cname
.
writePrincipal
(
this
);
e
.
getSName
().
writePrincipal
(
this
);
write16
(
0
);
write16
(
0
);
write32
(
0
);
write32
(
0
);
write32
(
0
);
write32
(
0
);
write32
(
0
);
write8
(
0
);
write32
(
0
);
write32
(
0
);
write32
(
0
);
write32
(
e
.
getData
().
length
);
write
(
e
.
getData
());
write32
(
0
);
}
void
writeTicket
(
Ticket
t
)
throws
IOException
,
Asn1Exception
{
if
(
t
==
null
)
{
write32
(
0
);
...
...
src/share/classes/sun/security/krb5/internal/ccache/Credentials.java
浏览文件 @
a495795c
...
...
@@ -169,6 +169,18 @@ public class Credentials {
return
sname
;
}
public
Ticket
getTicket
()
throws
RealmException
{
return
ticket
;
}
public
PrincipalName
getServicePrincipal2
()
throws
RealmException
{
return
secondTicket
==
null
?
null
:
secondTicket
.
sname
;
}
public
PrincipalName
getClientPrincipal
()
throws
RealmException
{
return
cname
;
}
public
sun
.
security
.
krb5
.
Credentials
setKrbCreds
()
{
// Note: We will not pass authorizationData to s.s.k.Credentials. The
// field in that class will be passed to Krb5Context as the return
...
...
@@ -208,7 +220,15 @@ public class Credentials {
return
key
.
getEType
();
}
public
EncryptionKey
getKey
()
{
return
key
;
}
public
int
getTktEType
()
{
return
ticket
.
encPart
.
getEType
();
}
public
int
getTktEType2
()
{
return
(
secondTicket
==
null
)
?
0
:
secondTicket
.
encPart
.
getEType
();
}
}
src/share/classes/sun/security/krb5/internal/ccache/CredentialsCache.java
浏览文件 @
a495795c
...
...
@@ -32,14 +32,9 @@ package sun.security.krb5.internal.ccache;
import
sun.security.krb5.*
;
import
sun.security.krb5.internal.*
;
import
java.util.StringTokenizer
;
import
java.util.
Vector
;
import
java.util.
List
;
import
java.io.IOException
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.BufferedReader
;
import
java.io.InputStreamReader
;
/**
* CredentialsCache stores credentials(tickets, session keys, etc) in a semi-permanent store
...
...
@@ -120,6 +115,62 @@ public abstract class CredentialsCache {
public
abstract
void
save
()
throws
IOException
,
KrbException
;
public
abstract
Credentials
[]
getCredsList
();
public
abstract
Credentials
getDefaultCreds
();
public
abstract
sun
.
security
.
krb5
.
Credentials
getInitialCreds
();
public
abstract
Credentials
getCreds
(
PrincipalName
sname
);
public
abstract
Credentials
getCreds
(
LoginOptions
options
,
PrincipalName
sname
);
public
abstract
void
addConfigEntry
(
ConfigEntry
e
);
public
abstract
List
<
ConfigEntry
>
getConfigEntries
();
public
ConfigEntry
getConfigEntry
(
String
name
)
{
List
<
ConfigEntry
>
entries
=
getConfigEntries
();
if
(
entries
!=
null
)
{
for
(
ConfigEntry
e
:
entries
)
{
if
(
e
.
getName
().
equals
(
name
))
{
return
e
;
}
}
}
return
null
;
}
public
static
class
ConfigEntry
{
public
ConfigEntry
(
String
name
,
PrincipalName
princ
,
byte
[]
data
)
{
this
.
name
=
name
;
this
.
princ
=
princ
;
this
.
data
=
data
;
}
private
final
String
name
;
private
final
PrincipalName
princ
;
private
final
byte
[]
data
;
// not worth cloning
public
String
getName
()
{
return
name
;
}
public
PrincipalName
getPrinc
()
{
return
princ
;
}
public
byte
[]
getData
()
{
return
data
;
}
@Override
public
String
toString
()
{
return
name
+
(
princ
!=
null
?
(
"."
+
princ
)
:
""
)
+
": "
+
new
String
(
data
);
}
public
PrincipalName
getSName
()
{
try
{
return
new
PrincipalName
(
"krb5_ccache_conf_data/"
+
name
+
(
princ
!=
null
?
(
"/"
+
princ
)
:
""
)
+
"@X-CACHECONF:"
);
}
catch
(
RealmException
e
)
{
throw
new
AssertionError
(
e
);
}
}
}
}
src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java
浏览文件 @
a495795c
/*
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
9
, 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
...
...
@@ -35,6 +35,12 @@ package sun.security.krb5.internal.ccache;
import
sun.security.krb5.*
;
import
sun.security.krb5.internal.*
;
import
sun.security.util.SecurityProperties
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.StringTokenizer
;
import
java.util.Vector
;
import
java.io.IOException
;
...
...
@@ -182,9 +188,13 @@ public class FileCredentialsCache extends CredentialsCache
primaryPrincipal
=
p
;
credentialsList
=
new
Vector
<
Credentials
>();
while
(
cis
.
available
()
>
0
)
{
Credentials
cred
=
cis
.
readCred
(
version
);
Object
cred
=
cis
.
readCred
(
version
);
if
(
cred
!=
null
)
{
credentialsList
.
addElement
(
cred
);
if
(
cred
instanceof
Credentials
)
{
credentialsList
.
addElement
((
Credentials
)
cred
);
}
else
{
addConfigEntry
((
CredentialsCache
.
ConfigEntry
)
cred
);
}
}
}
}
...
...
@@ -255,6 +265,9 @@ public class FileCredentialsCache extends CredentialsCache
cos
.
addCreds
(
tmp
[
i
]);
}
}
for
(
ConfigEntry
e
:
getConfigEntries
())
{
cos
.
addConfigEntry
(
primaryPrincipal
,
e
);
}
}
}
...
...
@@ -307,6 +320,17 @@ public class FileCredentialsCache extends CredentialsCache
}
}
private
List
<
ConfigEntry
>
configEntries
=
new
ArrayList
<>();
@Override
public
void
addConfigEntry
(
ConfigEntry
e
)
{
configEntries
.
add
(
e
);
}
@Override
public
List
<
ConfigEntry
>
getConfigEntries
()
{
return
Collections
.
unmodifiableList
(
configEntries
);
}
/**
* Gets a credentials for a specified service.
...
...
@@ -326,6 +350,81 @@ public class FileCredentialsCache extends CredentialsCache
return
null
;
}
public
sun
.
security
.
krb5
.
Credentials
getInitialCreds
()
{
Credentials
defaultCreds
=
getDefaultCreds
();
if
(
defaultCreds
==
null
)
{
return
null
;
}
sun
.
security
.
krb5
.
Credentials
tgt
=
defaultCreds
.
setKrbCreds
();
CredentialsCache
.
ConfigEntry
entry
=
getConfigEntry
(
"proxy_impersonator"
);
if
(
entry
==
null
)
{
if
(
DEBUG
)
{
System
.
out
.
println
(
"get normal credential"
);
}
return
tgt
;
}
boolean
force
;
String
prop
=
SecurityProperties
.
privilegedGetOverridable
(
"jdk.security.krb5.default.initiate.credential"
);
if
(
prop
==
null
)
{
prop
=
"always-impersonate"
;
}
switch
(
prop
)
{
case
"no-impersonate"
:
// never try impersonation
if
(
DEBUG
)
{
System
.
out
.
println
(
"get normal credential"
);
}
return
tgt
;
case
"try-impersonate"
:
force
=
false
;
break
;
case
"always-impersonate"
:
force
=
true
;
break
;
default
:
throw
new
RuntimeException
(
"Invalid jdk.security.krb5.default.initiate.credential"
);
}
try
{
PrincipalName
service
=
new
PrincipalName
(
new
String
(
entry
.
getData
(),
StandardCharsets
.
UTF_8
));
if
(!
tgt
.
getClient
().
equals
(
service
))
{
if
(
DEBUG
)
{
System
.
out
.
println
(
"proxy_impersonator does not match service name"
);
}
return
force
?
null
:
tgt
;
}
PrincipalName
client
=
getPrimaryPrincipal
();
Credentials
proxy
=
null
;
for
(
Credentials
c
:
getCredsList
())
{
if
(
c
.
getClientPrincipal
().
equals
(
client
)
&&
c
.
getServicePrincipal
().
equals
(
service
))
{
proxy
=
c
;
break
;
}
}
if
(
proxy
==
null
)
{
if
(
DEBUG
)
{
System
.
out
.
println
(
"Cannot find evidence ticket in ccache"
);
}
return
force
?
null
:
tgt
;
}
if
(
DEBUG
)
{
System
.
out
.
println
(
"Get proxied credential"
);
}
return
tgt
.
setProxy
(
proxy
.
setKrbCreds
());
}
catch
(
KrbException
e
)
{
if
(
DEBUG
)
{
System
.
out
.
println
(
"Impersonation with ccache failed"
);
}
return
force
?
null
:
tgt
;
}
}
public
Credentials
getDefaultCreds
()
{
Credentials
[]
list
=
getCredsList
();
if
(
list
==
null
)
{
...
...
src/share/classes/sun/security/ssl/EllipticCurvesExtension.java
浏览文件 @
a495795c
...
...
@@ -168,20 +168,11 @@ final class EllipticCurvesExtension extends HelloExtension {
"contains no supported elliptic curves"
);
}
}
else
{
// default curves
int
[]
ids
;
if
(
requireFips
)
{
ids
=
new
int
[]
{
// only NIST curves in FIPS mode
23
,
24
,
25
,
9
,
10
,
11
,
12
,
13
,
14
,
int
[]
ids
=
new
int
[]
{
// The three widely-used NIST curves:
// secp256r1, secp384r1 & secp521r1
23
,
24
,
25
};
}
else
{
ids
=
new
int
[]
{
// NIST curves first
23
,
24
,
25
,
9
,
10
,
11
,
12
,
13
,
14
,
// non-NIST curves
22
,
};
}
idList
=
new
ArrayList
<>(
ids
.
length
);
for
(
int
curveId
:
ids
)
{
...
...
src/share/classes/sun/security/util/SecurityConstants.java
浏览文件 @
a495795c
/*
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
9
, 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
...
...
@@ -176,6 +176,10 @@ public final class SecurityConstants {
public
static
final
NetPermission
GET_RESPONSECACHE_PERMISSION
=
new
NetPermission
(
"getResponseCache"
);
// java.net.ServerSocket, java.net.Socket
public
static
final
NetPermission
SET_SOCKETIMPL_PERMISSION
=
new
NetPermission
(
"setSocketImpl"
);
// java.lang.SecurityManager, sun.applet.AppletPanel, sun.misc.Launcher
public
static
final
RuntimePermission
CREATE_CLASSLOADER_PERMISSION
=
new
RuntimePermission
(
"createClassLoader"
);
...
...
src/share/classes/sun/security/util/SecurityProperties.java
0 → 100644
浏览文件 @
a495795c
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018 SAP SE. 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
sun.security.util
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.security.Security
;
public
class
SecurityProperties
{
/**
* Returns the value of the security property propName, which can be overridden
* by a system property of the same name
*
* @param propName the name of the system or security property
* @return the value of the system or security property
*/
public
static
String
privilegedGetOverridable
(
String
propName
)
{
if
(
System
.
getSecurityManager
()
==
null
)
{
return
getOverridableProperty
(
propName
);
}
else
{
return
AccessController
.
doPrivileged
((
PrivilegedAction
<
String
>)
()
->
getOverridableProperty
(
propName
));
}
}
private
static
String
getOverridableProperty
(
String
propName
)
{
String
val
=
System
.
getProperty
(
propName
);
if
(
val
==
null
)
{
return
Security
.
getProperty
(
propName
);
}
else
{
return
val
;
}
}
/**
* Returns true in case the system or security property "jdk.includeInExceptions"
* contains the category refName
*
* @param refName the category to check
* @return true in case the system or security property "jdk.includeInExceptions"
* contains refName, false otherwise
*/
public
static
boolean
includedInExceptions
(
String
refName
)
{
String
val
=
privilegedGetOverridable
(
"jdk.includeInExceptions"
);
if
(
val
==
null
)
{
return
false
;
}
String
[]
tokens
=
val
.
split
(
","
);
for
(
String
token
:
tokens
)
{
token
=
token
.
trim
();
if
(
token
.
equalsIgnoreCase
(
refName
))
{
return
true
;
}
}
return
false
;
}
}
src/share/classes/sun/util/calendar/ZoneInfoFile.java
浏览文件 @
a495795c
...
...
@@ -573,12 +573,8 @@ public final class ZoneInfoFile {
// we can then pass in the dom = -1, dow > 0 into ZoneInfo
//
// hacking, assume the >=24 is the result of ZRB optimization for
// "last", it works for now. From tzdata2019a this hacking
// will not work for Asia/Gaza and Asia/Hebron which follow
// Palestine DST rules.
if
(
dom
<
0
||
dom
>=
24
&&
!(
zoneId
.
equals
(
"Asia/Gaza"
)
||
zoneId
.
equals
(
"Asia/Hebron"
)))
{
// "last", it works for now.
if
(
dom
<
0
||
dom
>=
24
)
{
params
[
1
]
=
-
1
;
params
[
2
]
=
toCalendarDOW
[
dow
];
}
else
{
...
...
@@ -613,8 +609,6 @@ public final class ZoneInfoFile {
dstSavings
=
(
startRule
.
offsetAfter
-
startRule
.
offsetBefore
)
*
1000
;
// Note: known mismatching -> Asia/Amman
// Asia/Gaza
// Asia/Hebron
// ZoneInfo : startDayOfWeek=5 <= Thursday
// startTime=86400000 <= 24 hours
// This: startDayOfWeek=6
...
...
@@ -623,18 +617,14 @@ public final class ZoneInfoFile {
// its endDayOfWeek and endTime
// Below is the workarounds, it probably slows down everyone a little
if
(
params
[
2
]
==
6
&&
params
[
3
]
==
0
&&
(
zoneId
.
equals
(
"Asia/Amman"
)
||
zoneId
.
equals
(
"Asia/Gaza"
)
||
zoneId
.
equals
(
"Asia/Hebron"
)))
{
(
zoneId
.
equals
(
"Asia/Amman"
)))
{
params
[
2
]
=
5
;
params
[
3
]
=
86400000
;
}
// Additional check for startDayOfWeek=6 and starTime=86400000
// is needed for Asia/Amman;
Asia/Gasa and Asia/Hebron
// is needed for Asia/Amman;
if
(
params
[
2
]
==
7
&&
params
[
3
]
==
0
&&
(
zoneId
.
equals
(
"Asia/Amman"
)
||
zoneId
.
equals
(
"Asia/Gaza"
)
||
zoneId
.
equals
(
"Asia/Hebron"
)))
{
(
zoneId
.
equals
(
"Asia/Amman"
)))
{
params
[
2
]
=
6
;
// Friday
params
[
3
]
=
86400000
;
// 24h
}
...
...
src/share/lib/security/java.security-aix
浏览文件 @
a495795c
...
...
@@ -1005,3 +1005,32 @@ jceks.key.serialFilter = java.lang.Enum;java.security.KeyRep;\
# if this property is not enabled.
#
jdk.security.caDistrustPolicies=SYMANTEC_TLS
#
# Policies for the proxy_impersonator Kerberos ccache configuration entry
#
# The proxy_impersonator ccache configuration entry indicates that the ccache
# is a synthetic delegated credential for use with S4U2Proxy by an intermediate
# server. The ccache file should also contain the TGT of this server and
# an evidence ticket from the default principal of the ccache to this server.
#
# This security property determines how Java uses this configuration entry.
# There are 3 possible values:
#
# no-impersonate - Ignore this configuration entry, and always act as
# the owner of the TGT (if it exists).
#
# try-impersonate - Try impersonation when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# fallback to no-impersonate.
#
# always-impersonate - Always impersonate when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# no initial credential is read from the ccache.
#
# The default value is "always-impersonate".
#
# If a system property of the same name is also specified, it supersedes the
# security property value defined here.
#
#jdk.security.krb5.default.initiate.credential=always-impersonate
\ No newline at end of file
src/share/lib/security/java.security-linux
浏览文件 @
a495795c
...
...
@@ -1011,3 +1011,32 @@ jceks.key.serialFilter = java.lang.Enum;java.security.KeyRep;\
# if this property is not enabled.
#
jdk.security.caDistrustPolicies=SYMANTEC_TLS
#
# Policies for the proxy_impersonator Kerberos ccache configuration entry
#
# The proxy_impersonator ccache configuration entry indicates that the ccache
# is a synthetic delegated credential for use with S4U2Proxy by an intermediate
# server. The ccache file should also contain the TGT of this server and
# an evidence ticket from the default principal of the ccache to this server.
#
# This security property determines how Java uses this configuration entry.
# There are 3 possible values:
#
# no-impersonate - Ignore this configuration entry, and always act as
# the owner of the TGT (if it exists).
#
# try-impersonate - Try impersonation when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# fallback to no-impersonate.
#
# always-impersonate - Always impersonate when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# no initial credential is read from the ccache.
#
# The default value is "always-impersonate".
#
# If a system property of the same name is also specified, it supersedes the
# security property value defined here.
#
#jdk.security.krb5.default.initiate.credential=always-impersonate
\ No newline at end of file
src/share/lib/security/java.security-macosx
浏览文件 @
a495795c
...
...
@@ -1009,3 +1009,32 @@ jceks.key.serialFilter = java.lang.Enum;java.security.KeyRep;\
# if this property is not enabled.
#
jdk.security.caDistrustPolicies=SYMANTEC_TLS
#
# Policies for the proxy_impersonator Kerberos ccache configuration entry
#
# The proxy_impersonator ccache configuration entry indicates that the ccache
# is a synthetic delegated credential for use with S4U2Proxy by an intermediate
# server. The ccache file should also contain the TGT of this server and
# an evidence ticket from the default principal of the ccache to this server.
#
# This security property determines how Java uses this configuration entry.
# There are 3 possible values:
#
# no-impersonate - Ignore this configuration entry, and always act as
# the owner of the TGT (if it exists).
#
# try-impersonate - Try impersonation when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# fallback to no-impersonate.
#
# always-impersonate - Always impersonate when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# no initial credential is read from the ccache.
#
# The default value is "always-impersonate".
#
# If a system property of the same name is also specified, it supersedes the
# security property value defined here.
#
#jdk.security.krb5.default.initiate.credential=always-impersonate
\ No newline at end of file
src/share/lib/security/java.security-solaris
浏览文件 @
a495795c
...
...
@@ -1008,3 +1008,32 @@ jceks.key.serialFilter = java.lang.Enum;java.security.KeyRep;\
# if this property is not enabled.
#
jdk.security.caDistrustPolicies=SYMANTEC_TLS
#
# Policies for the proxy_impersonator Kerberos ccache configuration entry
#
# The proxy_impersonator ccache configuration entry indicates that the ccache
# is a synthetic delegated credential for use with S4U2Proxy by an intermediate
# server. The ccache file should also contain the TGT of this server and
# an evidence ticket from the default principal of the ccache to this server.
#
# This security property determines how Java uses this configuration entry.
# There are 3 possible values:
#
# no-impersonate - Ignore this configuration entry, and always act as
# the owner of the TGT (if it exists).
#
# try-impersonate - Try impersonation when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# fallback to no-impersonate.
#
# always-impersonate - Always impersonate when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# no initial credential is read from the ccache.
#
# The default value is "always-impersonate".
#
# If a system property of the same name is also specified, it supersedes the
# security property value defined here.
#
#jdk.security.krb5.default.initiate.credential=always-impersonate
\ No newline at end of file
src/share/lib/security/java.security-windows
浏览文件 @
a495795c
...
...
@@ -1009,3 +1009,32 @@ jceks.key.serialFilter = java.lang.Enum;java.security.KeyRep;\
# if this property is not enabled.
#
jdk.security.caDistrustPolicies=SYMANTEC_TLS
#
# Policies for the proxy_impersonator Kerberos ccache configuration entry
#
# The proxy_impersonator ccache configuration entry indicates that the ccache
# is a synthetic delegated credential for use with S4U2Proxy by an intermediate
# server. The ccache file should also contain the TGT of this server and
# an evidence ticket from the default principal of the ccache to this server.
#
# This security property determines how Java uses this configuration entry.
# There are 3 possible values:
#
# no-impersonate - Ignore this configuration entry, and always act as
# the owner of the TGT (if it exists).
#
# try-impersonate - Try impersonation when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# fallback to no-impersonate.
#
# always-impersonate - Always impersonate when this configuration entry exists.
# If no matching TGT or evidence ticket is found,
# no initial credential is read from the ccache.
#
# The default value is "always-impersonate".
#
# If a system property of the same name is also specified, it supersedes the
# security property value defined here.
#
#jdk.security.krb5.default.initiate.credential=always-impersonate
\ No newline at end of file
src/share/native/sun/font/DrawGlyphList.c
浏览文件 @
a495795c
...
...
@@ -532,6 +532,12 @@ GlyphBlitVector* setupLCDBlitVector(JNIEnv *env, jobject glyphlist) {
*/
if
(
subPixPos
&&
len
>
0
)
{
ginfo
=
(
GlyphInfo
*
)
imagePtrs
[
0
];
if
(
ginfo
==
NULL
)
{
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
glyphImages
,
imagePtrs
,
JNI_ABORT
);
free
(
gbv
);
return
(
GlyphBlitVector
*
)
NULL
;
}
/* rowBytes==width tests if its a B&W or LCD glyph */
if
(
ginfo
->
width
==
ginfo
->
rowBytes
)
{
subPixPos
=
JNI_FALSE
;
...
...
@@ -561,6 +567,12 @@ GlyphBlitVector* setupLCDBlitVector(JNIEnv *env, jobject glyphlist) {
jfloat
px
,
py
;
ginfo
=
(
GlyphInfo
*
)
imagePtrs
[
g
];
if
(
ginfo
==
NULL
)
{
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
glyphImages
,
imagePtrs
,
JNI_ABORT
);
free
(
gbv
);
return
(
GlyphBlitVector
*
)
NULL
;
}
gbv
->
glyphs
[
g
].
glyphInfo
=
ginfo
;
gbv
->
glyphs
[
g
].
pixels
=
ginfo
->
image
;
gbv
->
glyphs
[
g
].
width
=
ginfo
->
width
;
...
...
@@ -636,6 +648,12 @@ GlyphBlitVector* setupLCDBlitVector(JNIEnv *env, jobject glyphlist) {
}
else
{
for
(
g
=
0
;
g
<
len
;
g
++
)
{
ginfo
=
(
GlyphInfo
*
)
imagePtrs
[
g
];
if
(
ginfo
==
NULL
)
{
(
*
env
)
->
ReleasePrimitiveArrayCritical
(
env
,
glyphImages
,
imagePtrs
,
JNI_ABORT
);
free
(
gbv
);
return
(
GlyphBlitVector
*
)
NULL
;
}
gbv
->
glyphs
[
g
].
glyphInfo
=
ginfo
;
gbv
->
glyphs
[
g
].
pixels
=
ginfo
->
image
;
gbv
->
glyphs
[
g
].
width
=
ginfo
->
width
;
...
...
src/share/native/sun/font/freetypeScaler.c
浏览文件 @
a495795c
...
...
@@ -154,7 +154,31 @@ static unsigned long ReadTTFontFileFunc(FT_Stream stream,
jobject
bBuffer
;
int
bread
=
0
;
if
(
numBytes
==
0
)
return
0
;
/* A call with numBytes == 0 is a seek. It should return 0 if the
* seek position is within the file and non-zero otherwise.
* For all other cases, ie numBytes !=0, return the number of bytes
* actually read. This applies to truncated reads and also failed reads.
*/
if
(
numBytes
==
0
)
{
if
(
offset
>=
scalerInfo
->
fileSize
)
{
return
-
1
;
}
else
{
return
0
;
}
}
if
(
offset
+
numBytes
<
offset
)
{
return
0
;
// ft should not do this, but just in case.
}
if
(
offset
>=
scalerInfo
->
fileSize
)
{
return
0
;
}
if
(
offset
+
numBytes
>
scalerInfo
->
fileSize
)
{
numBytes
=
scalerInfo
->
fileSize
-
offset
;
}
/* Large reads will bypass the cache and data copying */
if
(
numBytes
>
FILEDATACACHESIZE
)
{
...
...
@@ -164,7 +188,11 @@ static unsigned long ReadTTFontFileFunc(FT_Stream stream,
scalerInfo
->
font2D
,
sunFontIDs
.
ttReadBlockMID
,
bBuffer
,
offset
,
numBytes
);
if
(
bread
<
0
)
{
return
0
;
}
else
{
return
bread
;
}
}
else
{
/* We probably hit bug bug 4845371. For reasons that
* are currently unclear, the call stacks after the initial
...
...
@@ -179,10 +207,19 @@ static unsigned long ReadTTFontFileFunc(FT_Stream stream,
(
*
env
)
->
CallObjectMethod
(
env
,
scalerInfo
->
font2D
,
sunFontIDs
.
ttReadBytesMID
,
offset
,
numBytes
);
/* If there's an OutofMemoryError then byteArray will be null */
if
(
byteArray
==
NULL
)
{
return
0
;
}
else
{
jsize
len
=
(
*
env
)
->
GetArrayLength
(
env
,
byteArray
);
if
(
len
<
numBytes
)
{
numBytes
=
len
;
// don't get more bytes than there are ..
}
(
*
env
)
->
GetByteArrayRegion
(
env
,
byteArray
,
0
,
numBytes
,
(
jbyte
*
)
destBuffer
);
return
numBytes
;
}
}
}
/* Do we have a cache hit? */
else
if
(
scalerInfo
->
fontDataOffset
<=
offset
&&
scalerInfo
->
fontDataOffset
+
scalerInfo
->
fontDataLength
>=
...
...
@@ -203,6 +240,11 @@ static unsigned long ReadTTFontFileFunc(FT_Stream stream,
sunFontIDs
.
ttReadBlockMID
,
bBuffer
,
offset
,
scalerInfo
->
fontDataLength
);
if
(
bread
<=
0
)
{
return
0
;
}
else
if
(
bread
<
numBytes
)
{
numBytes
=
bread
;
}
memcpy
(
destBuffer
,
scalerInfo
->
fontData
,
numBytes
);
return
numBytes
;
}
...
...
@@ -580,16 +622,17 @@ Java_sun_font_FreetypeFontScaler_getGlyphAdvanceNative(
to avoid unnecesary work with bitmaps. */
GlyphInfo
*
info
;
jfloat
advance
;
jfloat
advance
=
0
.
0
f
;
jlong
image
;
image
=
Java_sun_font_FreetypeFontScaler_getGlyphImageNative
(
env
,
scaler
,
font2D
,
pScalerContext
,
pScaler
,
glyphCode
);
info
=
(
GlyphInfo
*
)
jlong_to_ptr
(
image
);
if
(
info
!=
NULL
)
{
advance
=
info
->
advanceX
;
free
(
info
);
}
return
advance
;
}
...
...
@@ -727,6 +770,13 @@ static void CopyFTSubpixelVToSubpixel(const void* srcImage, int srcRowBytes,
}
/* JDK does not use glyph images for fonts with a
* pixel size > 100 (see THRESHOLD in OutlineTextRenderer.java)
* so if the glyph bitmap image dimension is > 1024 pixels,
* something is up.
*/
#define MAX_GLYPH_DIM 1024
/*
* Class: sun_font_FreetypeFontScaler
* Method: getGlyphImageNative
...
...
@@ -803,11 +853,28 @@ Java_sun_font_FreetypeFontScaler_getGlyphImageNative(
/* generate bitmap if it is not done yet
e.g. if algorithmic styling is performed and style was added to outline */
if
(
ftglyph
->
format
==
FT_GLYPH_FORMAT_OUTLINE
)
{
FT_Render_Glyph
(
ftglyph
,
FT_LOAD_TARGET_MODE
(
target
));
FT_BBox
bbox
;
int
w
,
h
;
FT_Outline_Get_CBox
(
&
(
ftglyph
->
outline
),
&
bbox
);
w
=
(
int
)((
bbox
.
xMax
>>
6
)
-
(
bbox
.
xMin
>>
6
));
h
=
(
int
)((
bbox
.
yMax
>>
6
)
-
(
bbox
.
yMin
>>
6
));
if
(
w
>
MAX_GLYPH_DIM
||
h
>
MAX_GLYPH_DIM
)
{
glyphInfo
=
getNullGlyphImage
();
return
ptr_to_jlong
(
glyphInfo
);
}
error
=
FT_Render_Glyph
(
ftglyph
,
FT_LOAD_TARGET_MODE
(
target
));
if
(
error
!=
0
)
{
return
ptr_to_jlong
(
getNullGlyphImage
());
}
}
width
=
(
UInt16
)
ftglyph
->
bitmap
.
width
;
height
=
(
UInt16
)
ftglyph
->
bitmap
.
rows
;
if
(
width
>
MAX_GLYPH_DIM
||
height
>
MAX_GLYPH_DIM
)
{
glyphInfo
=
getNullGlyphImage
();
return
ptr_to_jlong
(
glyphInfo
);
}
imageSize
=
width
*
height
;
glyphInfo
=
(
GlyphInfo
*
)
malloc
(
sizeof
(
GlyphInfo
)
+
imageSize
);
...
...
src/share/native/sun/font/layout/AlternateSubstSubtables.cpp
浏览文件 @
a495795c
...
...
@@ -42,6 +42,10 @@ U_NAMESPACE_BEGIN
le_uint32
AlternateSubstitutionSubtable
::
process
(
const
LEReferenceTo
<
AlternateSubstitutionSubtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
LEErrorCode
&
success
,
const
LEGlyphFilter
*
filter
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
// NOTE: For now, we'll just pick the first alternative...
LEGlyphID
glyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
coverageIndex
=
getGlyphCoverage
(
base
,
glyph
,
success
);
...
...
src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp
浏览文件 @
a495795c
...
...
@@ -41,6 +41,10 @@ U_NAMESPACE_BEGIN
le_uint32
CursiveAttachmentSubtable
::
process
(
const
LEReferenceTo
<
CursiveAttachmentSubtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
glyphID
=
glyphIterator
->
getCurrGlyphID
();
le_int32
coverageIndex
=
getGlyphCoverage
(
base
,
glyphID
,
success
);
le_uint16
eeCount
=
SWAPW
(
entryExitCount
);
...
...
src/share/native/sun/font/layout/LigatureSubstSubtables.cpp
浏览文件 @
a495795c
...
...
@@ -42,6 +42,10 @@ U_NAMESPACE_BEGIN
le_uint32
LigatureSubstitutionSubtable
::
process
(
const
LETableReference
&
base
,
GlyphIterator
*
glyphIterator
,
LEErrorCode
&
success
,
const
LEGlyphFilter
*
filter
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
glyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
coverageIndex
=
getGlyphCoverage
(
base
,
glyph
,
success
);
...
...
src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp
浏览文件 @
a495795c
...
...
@@ -53,6 +53,10 @@ LEGlyphID MarkToBasePositioningSubtable::findBaseGlyph(GlyphIterator *glyphItera
le_int32
MarkToBasePositioningSubtable
::
process
(
const
LETableReference
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
markGlyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
markCoverage
=
getGlyphCoverage
(
base
,
(
LEGlyphID
)
markGlyph
,
success
);
...
...
src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp
浏览文件 @
a495795c
...
...
@@ -52,6 +52,10 @@ LEGlyphID MarkToLigaturePositioningSubtable::findLigatureGlyph(GlyphIterator *gl
le_int32
MarkToLigaturePositioningSubtable
::
process
(
const
LETableReference
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
markGlyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
markCoverage
=
getGlyphCoverage
(
base
,
(
LEGlyphID
)
markGlyph
,
success
);
...
...
src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp
浏览文件 @
a495795c
...
...
@@ -53,6 +53,10 @@ LEGlyphID MarkToMarkPositioningSubtable::findMark2Glyph(GlyphIterator *glyphIter
le_int32
MarkToMarkPositioningSubtable
::
process
(
const
LETableReference
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
markGlyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
markCoverage
=
getGlyphCoverage
(
base
,
(
LEGlyphID
)
markGlyph
,
success
);
...
...
src/share/native/sun/font/layout/MorphTables.cpp
浏览文件 @
a495795c
...
...
@@ -46,6 +46,8 @@ U_NAMESPACE_BEGIN
void
MorphTableHeader
::
process
(
const
LETableReference
&
base
,
LEGlyphStorage
&
glyphStorage
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
return
;
le_uint32
chainCount
=
SWAPL
(
this
->
nChains
);
LEReferenceTo
<
ChainHeader
>
chainHeader
(
base
,
success
,
chains
);
// moving header
LEReferenceToArrayOf
<
ChainHeader
>
chainHeaderArray
(
base
,
success
,
chains
,
chainCount
);
...
...
src/share/native/sun/font/layout/PairPositioningSubtables.cpp
浏览文件 @
a495795c
...
...
@@ -43,6 +43,10 @@ U_NAMESPACE_BEGIN
le_uint32
PairPositioningSubtable
::
process
(
const
LEReferenceTo
<
PairPositioningSubtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
switch
(
SWAPW
(
subtableFormat
))
{
case
0
:
...
...
@@ -74,6 +78,10 @@ le_uint32 PairPositioningSubtable::process(const LEReferenceTo<PairPositioningSu
le_uint32
PairPositioningFormat1Subtable
::
process
(
const
LEReferenceTo
<
PairPositioningFormat1Subtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
firstGlyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
coverageIndex
=
getGlyphCoverage
(
base
,
firstGlyph
,
success
);
GlyphIterator
tempIterator
(
*
glyphIterator
);
...
...
@@ -123,6 +131,10 @@ le_uint32 PairPositioningFormat1Subtable::process(const LEReferenceTo<PairPositi
le_uint32
PairPositioningFormat2Subtable
::
process
(
const
LEReferenceTo
<
PairPositioningFormat2Subtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
firstGlyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
coverageIndex
=
getGlyphCoverage
(
base
,
firstGlyph
,
success
);
...
...
src/share/native/sun/font/layout/SegmentArrayProcessor.cpp
浏览文件 @
a495795c
...
...
@@ -59,6 +59,8 @@ SegmentArrayProcessor::~SegmentArrayProcessor()
void
SegmentArrayProcessor
::
process
(
LEGlyphStorage
&
glyphStorage
,
LEErrorCode
&
success
)
{
if
(
LE_FAILURE
(
success
))
return
;
const
LookupSegment
*
segments
=
segmentArrayLookupTable
->
segments
;
le_int32
glyphCount
=
glyphStorage
.
getGlyphCount
();
le_int32
glyph
;
...
...
src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp
浏览文件 @
a495795c
...
...
@@ -59,6 +59,8 @@ SegmentArrayProcessor2::~SegmentArrayProcessor2()
void
SegmentArrayProcessor2
::
process
(
LEGlyphStorage
&
glyphStorage
,
LEErrorCode
&
success
)
{
if
(
LE_FAILURE
(
success
))
return
;
const
LookupSegment
*
segments
=
segmentArrayLookupTable
->
segments
;
le_int32
glyphCount
=
glyphStorage
.
getGlyphCount
();
le_int32
glyph
;
...
...
src/share/native/sun/font/layout/SegmentSingleProcessor.cpp
浏览文件 @
a495795c
...
...
@@ -59,6 +59,8 @@ SegmentSingleProcessor::~SegmentSingleProcessor()
void
SegmentSingleProcessor
::
process
(
LEGlyphStorage
&
glyphStorage
,
LEErrorCode
&
success
)
{
if
(
LE_FAILURE
(
success
))
return
;
const
LookupSegment
*
segments
=
segmentSingleLookupTable
->
segments
;
le_int32
glyphCount
=
glyphStorage
.
getGlyphCount
();
le_int32
glyph
;
...
...
src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp
浏览文件 @
a495795c
...
...
@@ -60,6 +60,8 @@ SegmentSingleProcessor2::~SegmentSingleProcessor2()
void
SegmentSingleProcessor2
::
process
(
LEGlyphStorage
&
glyphStorage
,
LEErrorCode
&
success
)
{
if
(
LE_FAILURE
(
success
))
return
;
const
LookupSegment
*
segments
=
segmentSingleLookupTable
->
segments
;
le_int32
glyphCount
=
glyphStorage
.
getGlyphCount
();
le_int32
glyph
;
...
...
src/share/native/sun/font/layout/SimpleArrayProcessor.cpp
浏览文件 @
a495795c
...
...
@@ -59,6 +59,8 @@ SimpleArrayProcessor::~SimpleArrayProcessor()
void
SimpleArrayProcessor
::
process
(
LEGlyphStorage
&
glyphStorage
,
LEErrorCode
&
success
)
{
if
(
LE_FAILURE
(
success
))
return
;
le_int32
glyphCount
=
glyphStorage
.
getGlyphCount
();
le_int32
glyph
;
...
...
src/share/native/sun/font/layout/SinglePositioningSubtables.cpp
浏览文件 @
a495795c
...
...
@@ -42,6 +42,10 @@ U_NAMESPACE_BEGIN
le_uint32
SinglePositioningSubtable
::
process
(
const
LEReferenceTo
<
SinglePositioningSubtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
switch
(
SWAPW
(
subtableFormat
))
{
case
0
:
...
...
@@ -68,6 +72,10 @@ le_uint32 SinglePositioningSubtable::process(const LEReferenceTo<SinglePositioni
le_uint32
SinglePositioningFormat1Subtable
::
process
(
const
LEReferenceTo
<
SinglePositioningFormat1Subtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
glyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
coverageIndex
=
getGlyphCoverage
(
base
,
glyph
,
success
);
if
(
LE_FAILURE
(
success
))
{
...
...
@@ -85,6 +93,10 @@ le_uint32 SinglePositioningFormat1Subtable::process(const LEReferenceTo<SinglePo
le_uint32
SinglePositioningFormat2Subtable
::
process
(
const
LEReferenceTo
<
SinglePositioningFormat2Subtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
const
LEFontInstance
*
fontInstance
,
LEErrorCode
&
success
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
glyph
=
glyphIterator
->
getCurrGlyphID
();
le_int16
coverageIndex
=
(
le_int16
)
getGlyphCoverage
(
base
,
glyph
,
success
);
if
(
LE_FAILURE
(
success
))
{
...
...
src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp
浏览文件 @
a495795c
...
...
@@ -41,6 +41,10 @@ U_NAMESPACE_BEGIN
le_uint32
SingleSubstitutionSubtable
::
process
(
const
LEReferenceTo
<
SingleSubstitutionSubtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
LEErrorCode
&
success
,
const
LEGlyphFilter
*
filter
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
switch
(
SWAPW
(
subtableFormat
))
{
case
0
:
...
...
@@ -67,6 +71,10 @@ le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo<SingleSubstitu
le_uint32
SingleSubstitutionFormat1Subtable
::
process
(
const
LEReferenceTo
<
SingleSubstitutionFormat1Subtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
LEErrorCode
&
success
,
const
LEGlyphFilter
*
filter
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
glyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
coverageIndex
=
getGlyphCoverage
(
base
,
glyph
,
success
);
if
(
LE_FAILURE
(
success
))
{
...
...
@@ -88,6 +96,10 @@ le_uint32 SingleSubstitutionFormat1Subtable::process(const LEReferenceTo<SingleS
le_uint32
SingleSubstitutionFormat2Subtable
::
process
(
const
LEReferenceTo
<
SingleSubstitutionFormat2Subtable
>
&
base
,
GlyphIterator
*
glyphIterator
,
LEErrorCode
&
success
,
const
LEGlyphFilter
*
filter
)
const
{
if
(
LE_FAILURE
(
success
))
{
return
0
;
}
LEGlyphID
glyph
=
glyphIterator
->
getCurrGlyphID
();
le_int32
coverageIndex
=
getGlyphCoverage
(
base
,
glyph
,
success
);
if
(
LE_FAILURE
(
success
))
{
...
...
src/share/native/sun/font/layout/SingleTableProcessor.cpp
浏览文件 @
a495795c
...
...
@@ -59,6 +59,8 @@ SingleTableProcessor::~SingleTableProcessor()
void
SingleTableProcessor
::
process
(
LEGlyphStorage
&
glyphStorage
,
LEErrorCode
&
success
)
{
if
(
LE_FAILURE
(
success
))
return
;
const
LookupSingle
*
entries
=
singleTableLookupTable
->
entries
;
le_int32
glyph
;
le_int32
glyphCount
=
glyphStorage
.
getGlyphCount
();
...
...
src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h
浏览文件 @
a495795c
...
...
@@ -489,6 +489,8 @@ extern struct _CompositeTypes {
#define PtrCoord(p, x, xinc, y, yinc) PtrAddBytes(p, \
((ptrdiff_t)(y))*(yinc) + \
((ptrdiff_t)(x))*(xinc))
#define PtrPixelsRow(p, y, scanStride) PtrAddBytes(p, \
((intptr_t) (y)) * (scanStride))
/*
* The function to call with an array of NativePrimitive structures
...
...
src/share/native/sun/java2d/loops/LoopMacros.h
浏览文件 @
a495795c
...
...
@@ -137,7 +137,7 @@
do { \
juint w = WIDTH; \
jint tmpsxloc = SXLOC; \
SRCPTR = Ptr
AddBytes(SRCBASE, ((SYLOC >> SHIFT) * srcScan)
); \
SRCPTR = Ptr
PixelsRow(SRCBASE, (SYLOC >> SHIFT), srcScan
); \
Init ## DSTTYPE ## StoreVarsX(DSTPREFIX, DSTINFO); \
do { \
jint XVAR = (tmpsxloc >> SHIFT); \
...
...
@@ -2015,7 +2015,7 @@ void NAME_TRANSFORMHELPER_NN(SRC)(SurfaceDataRasInfo *pSrcInfo, \
\
Init ## SRC ## LoadVars(SrcRead, pSrcInfo); \
while (pRGB < pEnd) { \
SRC ## DataType *pRow = Ptr
AddBytes(pBase, WholeOfLong(ylong) *
scan); \
SRC ## DataType *pRow = Ptr
PixelsRow(pBase, WholeOfLong(ylong),
scan); \
Copy ## SRC ## ToIntArgbPre(pRGB, 0, \
SrcRead, pRow, WholeOfLong(xlong)); \
pRGB++; \
...
...
@@ -2063,7 +2063,7 @@ void NAME_TRANSFORMHELPER_BL(SRC)(SurfaceDataRasInfo *pSrcInfo, \
ydelta &= scan; \
\
xwhole += cx; \
pRow = Ptr
AddBytes(pSrcInfo->rasBase, (ywhole + cy) *
scan); \
pRow = Ptr
PixelsRow(pSrcInfo->rasBase, (ywhole + cy),
scan); \
Copy ## SRC ## ToIntArgbPre(pRGB, 0, SrcRead, pRow, xwhole); \
Copy ## SRC ## ToIntArgbPre(pRGB, 1, SrcRead, pRow, xwhole+xdelta); \
pRow = PtrAddBytes(pRow, ydelta); \
...
...
@@ -2121,7 +2121,7 @@ void NAME_TRANSFORMHELPER_BC(SRC)(SurfaceDataRasInfo *pSrcInfo, \
ydelta1 += (isneg & -scan); \
\
xwhole += cx; \
pRow = Ptr
AddBytes(pSrcInfo->rasBase, (ywhole + cy) *
scan); \
pRow = Ptr
PixelsRow(pSrcInfo->rasBase, (ywhole + cy),
scan); \
pRow = PtrAddBytes(pRow, ydelta0); \
Copy ## SRC ## ToIntArgbPre(pRGB, 0, SrcRead, pRow, xwhole+xdelta0); \
Copy ## SRC ## ToIntArgbPre(pRGB, 1, SrcRead, pRow, xwhole ); \
...
...
src/share/native/sun/java2d/opengl/OGLBlitLoops.c
浏览文件 @
a495795c
/*
* Copyright (c) 2003, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
9
, 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
...
...
@@ -180,6 +180,7 @@ OGLBlitSwToSurface(OGLContext *oglc, SurfaceDataRasInfo *srcInfo,
jdouble
dx1
,
jdouble
dy1
,
jdouble
dx2
,
jdouble
dy2
)
{
GLfloat
scalex
,
scaley
;
GLvoid
*
pSrc
;
scalex
=
((
GLfloat
)(
dx2
-
dx1
))
/
(
sx2
-
sx1
);
scaley
=
((
GLfloat
)(
dy2
-
dy1
))
/
(
sy2
-
sy1
);
...
...
@@ -208,21 +209,22 @@ OGLBlitSwToSurface(OGLContext *oglc, SurfaceDataRasInfo *srcInfo,
j2d_glPixelZoom
(
scalex
,
-
scaley
);
pSrc
=
PtrCoord
(
srcInfo
->
rasBase
,
sx1
,
srcInfo
->
pixelStride
,
sy1
,
srcInfo
->
scanStride
);
// in case pixel stride is not a multiple of scanline stride the copy
// has to be done line by line (see 6207877)
if
(
srcInfo
->
scanStride
%
srcInfo
->
pixelStride
!=
0
)
{
jint
width
=
sx2
-
sx1
;
jint
height
=
sy2
-
sy1
;
GLvoid
*
pSrc
=
srcInfo
->
rasBase
;
while
(
height
>
0
)
{
j2d_glDrawPixels
(
width
,
1
,
pf
->
format
,
pf
->
type
,
pSrc
);
j2d_glBitmap
(
0
,
0
,
0
,
0
,
(
GLfloat
)
0
,
(
GLfloat
)
-
1
,
NULL
);
j2d_glBitmap
(
0
,
0
,
0
,
0
,
(
GLfloat
)
0
,
(
GLfloat
)
-
scaley
,
NULL
);
pSrc
=
PtrAddBytes
(
pSrc
,
srcInfo
->
scanStride
);
height
--
;
}
}
else
{
j2d_glDrawPixels
(
sx2
-
sx1
,
sy2
-
sy1
,
pf
->
format
,
pf
->
type
,
srcInfo
->
rasBase
);
j2d_glDrawPixels
(
sx2
-
sx1
,
sy2
-
sy1
,
pf
->
format
,
pf
->
type
,
pSrc
);
}
j2d_glPixelZoom
(
1
.
0
,
1
.
0
);
...
...
@@ -317,12 +319,11 @@ OGLBlitToSurfaceViaTexture(OGLContext *oglc, SurfaceDataRasInfo *srcInfo,
ty2
=
((
GLdouble
)
sh
)
/
th
;
if
(
swsurface
)
{
if
(
slowPath
)
{
jint
tmph
=
sh
;
GLvoid
*
pSrc
=
PtrCoord
(
srcInfo
->
rasBase
,
sx
,
srcInfo
->
pixelStride
,
sy
,
srcInfo
->
scanStride
);
if
(
slowPath
)
{
jint
tmph
=
sh
;
while
(
tmph
>
0
)
{
j2d_glTexSubImage2D
(
GL_TEXTURE_2D
,
0
,
0
,
sh
-
tmph
,
sw
,
1
,
...
...
@@ -332,16 +333,10 @@ OGLBlitToSurfaceViaTexture(OGLContext *oglc, SurfaceDataRasInfo *srcInfo,
tmph
--
;
}
}
else
{
j2d_glPixelStorei
(
GL_UNPACK_SKIP_PIXELS
,
sx
);
j2d_glPixelStorei
(
GL_UNPACK_SKIP_ROWS
,
sy
);
j2d_glTexSubImage2D
(
GL_TEXTURE_2D
,
0
,
0
,
0
,
sw
,
sh
,
pf
->
format
,
pf
->
type
,
srcInfo
->
rasBase
);
j2d_glPixelStorei
(
GL_UNPACK_SKIP_PIXELS
,
0
);
j2d_glPixelStorei
(
GL_UNPACK_SKIP_ROWS
,
0
);
pSrc
);
}
// the texture image is "right side up", so we align the
...
...
@@ -638,8 +633,9 @@ OGLBlitLoops_Blit(JNIEnv *env,
J2dTraceLn4
(
J2D_TRACE_VERBOSE
,
" dx1=%f dy1=%f dx2=%f dy2=%f"
,
dx1
,
dy1
,
dx2
,
dy2
);
j2d_glPixelStorei
(
GL_UNPACK_SKIP_PIXELS
,
sx1
);
j2d_glPixelStorei
(
GL_UNPACK_SKIP_ROWS
,
sy1
);
// Note: we will calculate x/y positions in the raster manually
j2d_glPixelStorei
(
GL_UNPACK_SKIP_PIXELS
,
0
);
j2d_glPixelStorei
(
GL_UNPACK_SKIP_ROWS
,
0
);
j2d_glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
srcInfo
.
scanStride
/
srcInfo
.
pixelStride
);
j2d_glPixelStorei
(
GL_UNPACK_ALIGNMENT
,
pf
.
alignment
);
...
...
@@ -696,8 +692,6 @@ OGLBlitLoops_Blit(JNIEnv *env,
}
}
j2d_glPixelStorei
(
GL_UNPACK_SKIP_PIXELS
,
0
);
j2d_glPixelStorei
(
GL_UNPACK_SKIP_ROWS
,
0
);
j2d_glPixelStorei
(
GL_UNPACK_ROW_LENGTH
,
0
);
j2d_glPixelStorei
(
GL_UNPACK_ALIGNMENT
,
4
);
}
...
...
@@ -717,8 +711,8 @@ void flip(void *pDst, juint w, juint h, jint scanStride, jboolean convert) {
juint
step
=
0
;
// vertical flip and convert argbpre to argb if necessary
for
(;
i
<
h
/
2
;
++
i
)
{
juint
*
r1
=
Ptr
AddBytes
(
pDst
,
(
i
*
scanStride
)
);
juint
*
r2
=
Ptr
AddBytes
(
pDst
,
(
h
-
i
-
1
)
*
scanStride
);
juint
*
r1
=
Ptr
PixelsRow
(
pDst
,
i
,
scanStride
);
juint
*
r2
=
Ptr
PixelsRow
(
pDst
,
h
-
i
-
1
,
scanStride
);
if
(
tempRow
)
{
// fast path
memcpy
(
tempRow
,
r1
,
clippedStride
);
...
...
@@ -740,7 +734,7 @@ void flip(void *pDst, juint w, juint h, jint scanStride, jboolean convert) {
}
// convert the middle line if necessary
if
(
convert
&&
h
%
2
)
{
juint
*
r1
=
Ptr
AddBytes
(
pDst
,
(
i
*
scanStride
)
);
juint
*
r1
=
Ptr
PixelsRow
(
pDst
,
i
,
scanStride
);
for
(
step
=
0
;
step
<
w
;
++
step
)
{
LoadIntArgbPreTo1IntArgb
(
r1
,
0
,
step
,
r1
[
step
]);
}
...
...
@@ -813,7 +807,7 @@ OGLBlitLoops_SurfaceToSwBlit(JNIEnv *env, OGLContext *oglc,
height
=
srcInfo
.
bounds
.
y2
-
srcInfo
.
bounds
.
y1
;
pDst
=
PtrAddBytes
(
pDst
,
dstx
*
dstInfo
.
pixelStride
);
pDst
=
Ptr
AddBytes
(
pDst
,
dsty
*
dstInfo
.
scanStride
);
pDst
=
Ptr
PixelsRow
(
pDst
,
dsty
,
dstInfo
.
scanStride
);
j2d_glPixelStorei
(
GL_PACK_ROW_LENGTH
,
dstInfo
.
scanStride
/
dstInfo
.
pixelStride
);
...
...
src/share/native/sun/security/krb5/nativeccache.c
浏览文件 @
a495795c
...
...
@@ -291,6 +291,7 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ
int
netypes
;
jint
*
etypes
=
NULL
;
int
proxy_flag
=
0
;
/* Initialize the Kerberos 5 context */
err
=
krb5_init_context
(
&
kcontext
);
...
...
@@ -303,6 +304,48 @@ JNIEXPORT jobject JNICALL Java_sun_security_krb5_Credentials_acquireDefaultNativ
err
=
krb5_cc_set_flags
(
kcontext
,
ccache
,
flags
);
/* turn off OPENCLOSE */
}
// First round read. The proxy_impersonator config flag is not supported.
// This ccache will not be used if this flag exists.
if
(
!
err
)
{
err
=
krb5_cc_start_seq_get
(
kcontext
,
ccache
,
&
cursor
);
}
if
(
!
err
)
{
while
((
err
=
krb5_cc_next_cred
(
kcontext
,
ccache
,
&
cursor
,
&
creds
))
==
0
)
{
char
*
serverName
=
NULL
;
if
(
!
err
)
{
err
=
krb5_unparse_name
(
kcontext
,
creds
.
server
,
&
serverName
);
printiferr
(
err
,
"while unparsing server name"
);
}
if
(
!
err
)
{
if
(
!
strcmp
(
serverName
,
"krb5_ccache_conf_data/proxy_impersonator@X-CACHECONF:"
))
{
proxy_flag
=
1
;
}
}
if
(
serverName
!=
NULL
)
{
krb5_free_unparsed_name
(
kcontext
,
serverName
);
}
krb5_free_cred_contents
(
kcontext
,
&
creds
);
if
(
proxy_flag
)
break
;
}
if
(
err
==
KRB5_CC_END
)
{
err
=
0
;
}
printiferr
(
err
,
"while retrieving a ticket"
);
}
if
(
!
err
)
{
err
=
krb5_cc_end_seq_get
(
kcontext
,
ccache
,
&
cursor
);
printiferr
(
err
,
"while finishing ticket retrieval"
);
}
if
(
proxy_flag
)
{
goto
outer_cleanup
;
}
// End of first round read
if
(
!
err
)
{
err
=
krb5_cc_start_seq_get
(
kcontext
,
ccache
,
&
cursor
);
}
...
...
@@ -430,6 +473,7 @@ cleanup:
printiferr
(
err
,
"while finishing ticket retrieval"
);
}
outer_cleanup:
if
(
!
err
)
{
flags
=
KRB5_TC_OPENCLOSE
;
/* restore OPENCLOSE mode */
err
=
krb5_cc_set_flags
(
kcontext
,
ccache
,
flags
);
...
...
src/solaris/classes/sun/font/XRGlyphCache.java
浏览文件 @
a495795c
...
...
@@ -114,6 +114,9 @@ public class XRGlyphCache implements GlyphDisposedListener {
for
(
int
i
=
0
;
i
<
glyphList
.
getNumGlyphs
();
i
++)
{
XRGlyphCacheEntry
glyph
;
if
(
imgPtrs
[
i
]
==
0L
)
{
continue
;
}
// Find uncached glyphs and queue them for upload
if
((
glyph
=
getEntryForPointer
(
imgPtrs
[
i
]))
==
null
)
{
glyph
=
new
XRGlyphCacheEntry
(
imgPtrs
[
i
],
glyphList
);
...
...
src/solaris/classes/sun/font/XRTextRenderer.java
浏览文件 @
a495795c
...
...
@@ -88,6 +88,9 @@ public class XRTextRenderer extends GlyphListPipe {
for
(
int
i
=
0
;
i
<
gl
.
getNumGlyphs
();
i
++)
{
gl
.
setGlyphIndex
(
i
);
XRGlyphCacheEntry
cacheEntry
=
cachedGlyphs
[
i
];
if
(
cacheEntry
==
null
)
{
continue
;
}
eltList
.
getGlyphs
().
addInt
(
cacheEntry
.
getGlyphID
());
int
glyphSet
=
cacheEntry
.
getGlyphSet
();
...
...
src/solaris/classes/sun/nio/fs/BsdFileStore.java
浏览文件 @
a495795c
/*
* Copyright (c) 2008, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
9
, 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
...
...
@@ -62,22 +62,14 @@ class BsdFileStore
}
// step 2: find mount point
UnixPath
parent
=
path
.
getParent
();
while
(
parent
!=
null
)
{
UnixFileAttributes
attrs
=
null
;
byte
[]
dir
=
null
;
try
{
attrs
=
UnixFileAttributes
.
get
(
parent
,
true
);
dir
=
BsdNativeDispatcher
.
getmntonname
(
path
);
}
catch
(
UnixException
x
)
{
x
.
rethrowAsIOException
(
parent
);
}
if
(
attrs
.
dev
()
!=
dev
())
break
;
path
=
parent
;
parent
=
parent
.
getParent
();
x
.
rethrowAsIOException
(
path
);
}
// step 3: lookup mounted file systems
byte
[]
dir
=
path
.
asByteArray
();
for
(
UnixMountEntry
entry:
fs
.
getMountEntries
())
{
if
(
Arrays
.
equals
(
dir
,
entry
.
dir
()))
return
entry
;
...
...
src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java
浏览文件 @
a495795c
/*
* Copyright (c) 2008, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
9
, 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
...
...
@@ -51,6 +51,20 @@ class BsdNativeDispatcher extends UnixNativeDispatcher {
*/
static
native
void
endfsstat
(
long
iter
)
throws
UnixException
;
/**
* int statfs(const char *path, struct statfs *buf);
* returns buf->f_mntonname (directory on which mounted)
*/
static
byte
[]
getmntonname
(
UnixPath
path
)
throws
UnixException
{
NativeBuffer
pathBuffer
=
copyToNativeBuffer
(
path
);
try
{
return
getmntonname0
(
pathBuffer
.
address
());
}
finally
{
pathBuffer
.
release
();
}
}
static
native
byte
[]
getmntonname0
(
long
pathAddress
)
throws
UnixException
;
// initialize field IDs
private
static
native
void
initIDs
();
...
...
src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java
浏览文件 @
a495795c
...
...
@@ -36,7 +36,7 @@ class UnixNativeDispatcher {
protected
UnixNativeDispatcher
()
{
}
// returns a NativeBuffer containing the given path
private
static
NativeBuffer
copyToNativeBuffer
(
UnixPath
path
)
{
static
NativeBuffer
copyToNativeBuffer
(
UnixPath
path
)
{
byte
[]
cstr
=
path
.
getByteArrayForSysCalls
();
int
size
=
cstr
.
length
+
1
;
NativeBuffer
buffer
=
NativeBuffers
.
getNativeBufferFromCache
(
size
);
...
...
src/solaris/native/sun/java2d/x11/X11FontScaler_md.c
浏览文件 @
a495795c
...
...
@@ -273,6 +273,7 @@ JNIEXPORT jlong JNICALL AWTFontGenerateImage(AWTFont pFont, AWTChar2b* xChar) {
unsigned
int
imageSize
;
JNIEnv
*
env
;
FONT_AWT_LOCK
();
/* XTextExtents16(xFont, xChar, 1, &direction, &ascent, &descent, &xcs); */
XQueryTextExtents16
(
awt_display
,
xFont
->
fid
,
xChar
,
1
,
...
...
@@ -280,8 +281,11 @@ JNIEXPORT jlong JNICALL AWTFontGenerateImage(AWTFont pFont, AWTChar2b* xChar) {
width
=
xcs
.
rbearing
-
xcs
.
lbearing
;
height
=
xcs
.
ascent
+
xcs
.
descent
;
imageSize
=
width
*
height
;
glyphInfo
=
(
GlyphInfo
*
)
malloc
(
sizeof
(
GlyphInfo
)
+
imageSize
);
if
(
glyphInfo
==
NULL
)
{
AWT_UNLOCK
();
return
(
jlong
)(
uintptr_t
)
NULL
;
}
glyphInfo
->
cellInfo
=
NULL
;
glyphInfo
->
width
=
width
;
glyphInfo
->
height
=
height
;
...
...
src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c
浏览文件 @
a495795c
/*
* Copyright (c) 2008, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 201
9
, 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
...
...
@@ -203,3 +203,24 @@ Java_sun_nio_fs_BsdNativeDispatcher_endfsstat(JNIEnv* env, jclass this, jlong va
free
(
iter
);
}
}
JNIEXPORT
jbyteArray
JNICALL
Java_sun_nio_fs_BsdNativeDispatcher_getmntonname0
(
JNIEnv
*
env
,
jclass
this
,
jlong
pathAddress
)
{
struct
statfs
buf
;
const
char
*
path
=
(
const
char
*
)
jlong_to_ptr
(
pathAddress
);
if
(
statfs
(
path
,
&
buf
)
!=
0
)
{
throwUnixException
(
env
,
errno
);
}
jsize
len
=
strlen
(
buf
.
f_mntonname
);
jbyteArray
mntonname
=
(
*
env
)
->
NewByteArray
(
env
,
len
);
if
(
mntonname
!=
NULL
)
{
(
*
env
)
->
SetByteArrayRegion
(
env
,
mntonname
,
0
,
len
,
(
jbyte
*
)
buf
.
f_mntonname
);
}
return
mntonname
;
}
src/solaris/native/sun/security/smartcardio/MUSCLE/COPYING
0 → 100644
浏览文件 @
a495795c
Copyright (c) 1999-2003 David Corcoran <corcoran@musclecard.com>
Copyright (c) 2001-2011 Ludovic Rousseau <ludovic.rousseau@free.fr>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Some files are under GNU GPL v3 or any later version
- doc/example/pcsc_demo.c
- the files in src/spy/
- the files in UnitaryTests/
Copyright (C) 2003-2014 Ludovic Rousseau
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Files src/auth.c and src/auth.h are:
* Copyright (C) 2013 Red Hat
*
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* Author: Nikos Mavrogiannopoulos <nmav@redhat.com>
Files src/simclist.c and src/simclist.h are:
* Copyright (c) 2007,2008,2009,2010,2011 Mij <mij@bitchx.it>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
src/windows/classes/java/lang/ProcessImpl.java
浏览文件 @
a495795c
...
...
@@ -38,9 +38,11 @@ import java.lang.ProcessBuilder.Redirect;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.util.ArrayList
;
import
java.util.Locale
;
import
java.util.concurrent.TimeUnit
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
sun.security.action.GetPropertyAction
;
/* This class is for the exclusive use of ProcessBuilder.start() to
* create new processes.
...
...
@@ -172,12 +174,15 @@ final class ProcessImpl extends Process {
private
static
final
int
VERIFICATION_CMD_BAT
=
0
;
private
static
final
int
VERIFICATION_WIN32
=
1
;
private
static
final
int
VERIFICATION_LEGACY
=
2
;
private
static
final
int
VERIFICATION_WIN32_SAFE
=
2
;
// inside quotes not allowed
private
static
final
int
VERIFICATION_LEGACY
=
3
;
// See Command shell overview for documentation of special characters.
// https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb490954(v=technet.10)
private
static
final
char
ESCAPE_VERIFICATION
[][]
=
{
// We guarantee the only command file execution for implicit [cmd.exe] run.
// http://technet.microsoft.com/en-us/library/bb490954.aspx
{
' '
,
'\t'
,
'<'
,
'>'
,
'&'
,
'|'
,
'^'
},
{
' '
,
'\t'
,
'<'
,
'>'
},
{
' '
,
'\t'
,
'<'
,
'>'
},
{
' '
,
'\t'
}
};
...
...
@@ -194,8 +199,25 @@ final class ProcessImpl extends Process {
cmdbuf
.
append
(
' '
);
String
s
=
cmd
[
i
];
if
(
needsEscaping
(
verificationType
,
s
))
{
cmdbuf
.
append
(
'"'
)
.
append
(
s
)
;
cmdbuf
.
append
(
'"'
);
if
(
verificationType
==
VERIFICATION_WIN32_SAFE
)
{
// Insert the argument, adding '\' to quote any interior quotes
int
length
=
s
.
length
();
for
(
int
j
=
0
;
j
<
length
;
j
++)
{
char
c
=
s
.
charAt
(
j
);
if
(
c
==
DOUBLEQUOTE
)
{
int
count
=
countLeadingBackslash
(
verificationType
,
s
,
j
);
while
(
count
--
>
0
)
{
cmdbuf
.
append
(
BACKSLASH
);
// double the number of backslashes
}
cmdbuf
.
append
(
BACKSLASH
);
// backslash to quote the quote
}
cmdbuf
.
append
(
c
);
}
}
else
{
cmdbuf
.
append
(
s
);
}
// The code protects the [java.exe] and console command line
// parser, that interprets the [\"] combination as an escape
// sequence for the ["] char.
...
...
@@ -208,8 +230,9 @@ final class ProcessImpl extends Process {
// command line parser. The case of the [""] tail escape
// sequence could not be realized due to the argument validation
// procedure.
if
((
verificationType
!=
VERIFICATION_CMD_BAT
)
&&
s
.
endsWith
(
"\\"
))
{
cmdbuf
.
append
(
'\\'
);
int
count
=
countLeadingBackslash
(
verificationType
,
s
,
s
.
length
());
while
(
count
--
>
0
)
{
cmdbuf
.
append
(
BACKSLASH
);
// double the number of backslashes
}
cmdbuf
.
append
(
'"'
);
}
else
{
...
...
@@ -219,26 +242,16 @@ final class ProcessImpl extends Process {
return
cmdbuf
.
toString
();
}
private
static
boolean
isQuoted
(
boolean
noQuotesInside
,
String
arg
,
String
errorMessage
)
{
int
lastPos
=
arg
.
length
()
-
1
;
if
(
lastPos
>=
1
&&
arg
.
charAt
(
0
)
==
'"'
&&
arg
.
charAt
(
lastPos
)
==
'"'
)
{
// The argument has already been quoted.
if
(
noQuotesInside
)
{
if
(
arg
.
indexOf
(
'"'
,
1
)
!=
lastPos
)
{
// There is ["] inside.
throw
new
IllegalArgumentException
(
errorMessage
);
}
}
return
true
;
}
if
(
noQuotesInside
)
{
if
(
arg
.
indexOf
(
'"'
)
>=
0
)
{
// There is ["] inside.
throw
new
IllegalArgumentException
(
errorMessage
);
}
}
return
false
;
/**
* Return the argument without quotes (1st and last) if present, else the arg.
* @param str a string
* @return the string without 1st and last quotes
*/
private
static
String
unQuote
(
String
str
)
{
int
len
=
str
.
length
();
return
(
len
>=
2
&&
str
.
charAt
(
0
)
==
DOUBLEQUOTE
&&
str
.
charAt
(
len
-
1
)
==
DOUBLEQUOTE
)
?
str
.
substring
(
1
,
len
-
1
)
:
str
;
}
private
static
boolean
needsEscaping
(
int
verificationType
,
String
arg
)
{
...
...
@@ -249,9 +262,26 @@ final class ProcessImpl extends Process {
// For [.exe] or [.com] file the unpaired/internal ["]
// in the argument is not a problem.
boolean
argIsQuoted
=
isQuoted
(
(
verificationType
==
VERIFICATION_CMD_BAT
),
arg
,
"Argument has embedded quote, use the explicit CMD.EXE call."
);
String
unquotedArg
=
unQuote
(
arg
);
boolean
argIsQuoted
=
!
arg
.
equals
(
unquotedArg
);
boolean
embeddedQuote
=
unquotedArg
.
indexOf
(
DOUBLEQUOTE
)
>=
0
;
switch
(
verificationType
)
{
case
VERIFICATION_CMD_BAT:
if
(
embeddedQuote
)
{
throw
new
IllegalArgumentException
(
"Argument has embedded quote, "
+
"use the explicit CMD.EXE call."
);
}
break
;
// break determine whether to quote
case
VERIFICATION_WIN32_SAFE:
if
(
argIsQuoted
&&
embeddedQuote
)
{
throw
new
IllegalArgumentException
(
"Malformed argument has embedded quote: "
+
unquotedArg
);
}
break
;
default
:
break
;
}
if
(!
argIsQuoted
)
{
char
testEscape
[]
=
ESCAPE_VERIFICATION
[
verificationType
];
...
...
@@ -267,13 +297,13 @@ final class ProcessImpl extends Process {
private
static
String
getExecutablePath
(
String
path
)
throws
IOException
{
boolean
pathIsQuoted
=
isQuoted
(
true
,
path
,
"Executable name has embedded quote, split the arguments"
);
String
name
=
unQuote
(
path
);
if
(
name
.
indexOf
(
DOUBLEQUOTE
)
>=
0
)
{
throw
new
IllegalArgumentException
(
"Executable name has embedded quote, "
+
"split the arguments: "
+
name
);
}
// Win32 CreateProcess requires path to be normalized
File
fileToRun
=
new
File
(
pathIsQuoted
?
path
.
substring
(
1
,
path
.
length
()
-
1
)
:
path
);
File
fileToRun
=
new
File
(
name
);
// From the [CreateProcess] function documentation:
//
...
...
@@ -288,13 +318,26 @@ final class ProcessImpl extends Process {
// sequence:..."
//
// In practice ANY non-existent path is extended by [.exe] extension
// in the [CreateProcess] funcion with the only exception:
// in the [CreateProcess] func
t
ion with the only exception:
// the path ends by (.)
return
fileToRun
.
getPath
();
}
/**
* An executable is any program that is an EXE or does not have an extension
* and the Windows createProcess will be looking for .exe.
* The comparison is case insensitive based on the name.
* @param executablePath the executable file
* @return true if the path ends in .exe or does not have an extension.
*/
private
boolean
isExe
(
String
executablePath
)
{
File
file
=
new
File
(
executablePath
);
String
upName
=
file
.
getName
().
toUpperCase
(
Locale
.
ROOT
);
return
(
upName
.
endsWith
(
".EXE"
)
||
upName
.
indexOf
(
'.'
)
<
0
);
}
// Old version that can be bypassed
private
boolean
isShellFile
(
String
executablePath
)
{
String
upPath
=
executablePath
.
toUpperCase
();
return
(
upPath
.
endsWith
(
".CMD"
)
||
upPath
.
endsWith
(
".BAT"
));
...
...
@@ -305,6 +348,21 @@ final class ProcessImpl extends Process {
return
argbuf
.
append
(
'"'
).
append
(
arg
).
append
(
'"'
).
toString
();
}
// Count backslashes before start index of string.
// .bat files don't include backslashes as part of the quote
private
static
int
countLeadingBackslash
(
int
verificationType
,
CharSequence
input
,
int
start
)
{
if
(
verificationType
==
VERIFICATION_CMD_BAT
)
return
0
;
int
j
;
for
(
j
=
start
-
1
;
j
>=
0
&&
input
.
charAt
(
j
)
==
BACKSLASH
;
j
--)
{
// just scanning backwards
}
return
(
start
-
1
)
-
j
;
// number of BACKSLASHES
}
private
static
final
char
DOUBLEQUOTE
=
'\"'
;
private
static
final
char
BACKSLASH
=
'\\'
;
private
long
handle
=
0
;
private
OutputStream
stdin_stream
;
...
...
@@ -319,15 +377,14 @@ final class ProcessImpl extends Process {
throws
IOException
{
String
cmdstr
;
SecurityManager
security
=
System
.
getSecurityManager
();
boolean
allowAmbiguousCommands
=
false
;
if
(
security
==
null
)
{
allowAmbiguousCommands
=
true
;
String
value
=
System
.
getProperty
(
"jdk.lang.Process.allowAmbiguousCommands"
);
if
(
value
!=
null
)
allowAmbiguousCommands
=
!
"false"
.
equalsIgnoreCase
(
value
);
}
if
(
allowAmbiguousCommands
)
{
final
SecurityManager
security
=
System
.
getSecurityManager
();
String
propertyValue
=
GetPropertyAction
.
privilegedGetProperty
(
"jdk.lang.Process.allowAmbiguousCommands"
);
final
String
value
=
propertyValue
!=
null
?
propertyValue
:
(
security
==
null
?
"true"
:
"false"
);
final
boolean
allowAmbiguousCommands
=
!
"false"
.
equalsIgnoreCase
(
value
);
if
(
allowAmbiguousCommands
&&
security
==
null
)
{
// Legacy mode.
// Normalize path if possible.
...
...
@@ -374,11 +431,12 @@ final class ProcessImpl extends Process {
// Quotation protects from interpretation of the [path] argument as
// start of longer path with spaces. Quotation has no influence to
// [.exe] extension heuristic.
boolean
isShell
=
allowAmbiguousCommands
?
isShellFile
(
executablePath
)
:
!
isExe
(
executablePath
);
cmdstr
=
createCommandLine
(
// We need the extended verification procedure for CMD files.
isShellFile
(
executablePath
)
?
VERIFICATION_CMD_BAT
:
VERIFICATION_WIN32
,
// We need the extended verification procedures
isShell
?
VERIFICATION_CMD_BAT
:
(
allowAmbiguousCommands
?
VERIFICATION_WIN32
:
VERIFICATION_WIN32_SAFE
),
quoteString
(
executablePath
),
cmd
);
}
...
...
src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java
浏览文件 @
a495795c
/*
* Copyright (c) 2002, 201
6
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 201
9
, 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
...
...
@@ -194,7 +194,17 @@ public class NTLMAuthentication extends AuthenticationInfo {
}
}
static
native
boolean
isTrustedSite
(
String
url
);
private
static
final
boolean
isTrustedSiteAvailable
=
isTrustedSiteAvailable
();
private
static
native
boolean
isTrustedSiteAvailable
();
private
static
boolean
isTrustedSite
(
String
url
)
{
if
(
isTrustedSiteAvailable
)
return
isTrustedSite0
(
url
);
return
false
;
}
private
static
native
boolean
isTrustedSite0
(
String
url
);
/**
* Not supported. Must use the setHeaders() method
...
...
src/windows/classes/sun/security/krb5/internal/tools/Klist.java
浏览文件 @
a495795c
/*
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
9
, 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
...
...
@@ -31,6 +31,8 @@
package
sun.security.krb5.internal.tools
;
import
java.net.InetAddress
;
import
java.util.List
;
import
sun.security.krb5.*
;
import
sun.security.krb5.internal.*
;
import
sun.security.krb5.internal.ccache.*
;
...
...
@@ -241,6 +243,8 @@ public class Klist {
String
endtime
;
String
renewTill
;
String
servicePrincipal
;
PrincipalName
servicePrincipal2
;
String
clientPrincipal
;
if
(
creds
[
i
].
getStartTime
()
!=
null
)
{
starttime
=
format
(
creds
[
i
].
getStartTime
());
}
else
{
...
...
@@ -252,6 +256,18 @@ public class Klist {
System
.
out
.
println
(
"["
+
(
i
+
1
)
+
"] "
+
" Service Principal: "
+
servicePrincipal
);
servicePrincipal2
=
creds
[
i
].
getServicePrincipal2
();
if
(
servicePrincipal2
!=
null
)
{
System
.
out
.
println
(
" Second Service: "
+
servicePrincipal2
);
}
clientPrincipal
=
creds
[
i
].
getClientPrincipal
().
toString
();
if
(!
clientPrincipal
.
equals
(
defaultPrincipal
))
{
System
.
out
.
println
(
" Client Principal: "
+
clientPrincipal
);
}
System
.
out
.
println
(
" Valid starting: "
+
starttime
);
System
.
out
.
println
(
" Expires: "
+
endtime
);
if
(
creds
[
i
].
getRenewTill
()
!=
null
)
{
...
...
@@ -262,8 +278,15 @@ public class Klist {
if
(
options
[
0
]
==
'e'
)
{
String
eskey
=
EType
.
toString
(
creds
[
i
].
getEType
());
String
etkt
=
EType
.
toString
(
creds
[
i
].
getTktEType
());
if
(
creds
[
i
].
getTktEType2
()
==
0
)
{
System
.
out
.
println
(
" EType (skey, tkt): "
+
eskey
+
", "
+
etkt
);
}
else
{
String
etkt2
=
EType
.
toString
(
creds
[
i
].
getTktEType2
());
System
.
out
.
println
(
" EType (skey, tkts): "
+
eskey
+
", "
+
etkt
+
", "
+
etkt2
);
}
}
if
(
options
[
1
]
==
'f'
)
{
System
.
out
.
println
(
" Flags: "
+
...
...
@@ -302,6 +325,15 @@ public class Klist {
}
else
{
System
.
out
.
println
(
"\nNo entries found."
);
}
List
<
CredentialsCache
.
ConfigEntry
>
configEntries
=
cache
.
getConfigEntries
();
if
(
configEntries
!=
null
&&
!
configEntries
.
isEmpty
())
{
System
.
out
.
println
(
"\nConfig entries:"
);
for
(
CredentialsCache
.
ConfigEntry
e
:
configEntries
)
{
System
.
out
.
println
(
" "
+
e
);
}
}
}
void
displayMessage
(
String
target
)
{
...
...
src/windows/native/sun/java2d/d3d/D3DContext.cpp
浏览文件 @
a495795c
...
...
@@ -1156,7 +1156,9 @@ D3DContext::UploadTileToTexture(D3DResource *pTextureRes, void *pixels,
{
#ifndef PtrAddBytes
#define PtrAddBytes(p, b) ((void *) (((intptr_t) (p)) + (b)))
#define PtrCoord(p, x, xinc, y, yinc) PtrAddBytes(p, (y)*(yinc) + (x)*(xinc))
#define PtrCoord(p, x, xinc, y, yinc) PtrAddBytes(p, \
((ptrdiff_t)(y))*(yinc) + \
((ptrdiff_t)(x))*(xinc))
#endif // PtrAddBytes
HRESULT
res
=
S_OK
;
...
...
src/windows/native/sun/net/www/protocol/http/ntlm/NTLMAuthentication.c
浏览文件 @
a495795c
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018,
2019,
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
...
...
@@ -26,11 +26,34 @@
#include <jni.h>
#include <windows.h>
#include "jni_util.h"
#include "jdk_util.h"
#include <urlmon.h>
JNIEXPORT
jboolean
JNICALL
Java_sun_net_www_protocol_http_ntlm_NTLMAuthentication_isTrustedSite
(
JNIEnv
*
env
,
jclass
clazz
,
jstring
url
)
typedef
HRESULT
(
WINAPI
*
CoInternetCreateSecurityManagerType
)
(
IServiceProvider
*
,
IInternetSecurityManager
**
,
DWORD
);
static
CoInternetCreateSecurityManagerType
fn_CoInternetCreateSecurityManager
;
JNIEXPORT
jboolean
JNICALL
Java_sun_net_www_protocol_http_ntlm_NTLMAuthentication_isTrustedSiteAvailable
(
JNIEnv
*
env
,
jclass
clazz
)
{
HMODULE
libUrlmon
=
JDK_LoadSystemLibrary
(
"urlmon.dll"
);
if
(
libUrlmon
!=
NULL
)
{
fn_CoInternetCreateSecurityManager
=
(
CoInternetCreateSecurityManagerType
)
GetProcAddress
(
libUrlmon
,
"CoInternetCreateSecurityManager"
);
if
(
fn_CoInternetCreateSecurityManager
!=
NULL
)
{
return
JNI_TRUE
;
}
}
return
JNI_FALSE
;
}
JNIEXPORT
jboolean
JNICALL
Java_sun_net_www_protocol_http_ntlm_NTLMAuthentication_isTrustedSite0
(
JNIEnv
*
env
,
jclass
clazz
,
jstring
url
)
{
HRESULT
hr
;
DWORD
dwZone
;
DWORD
pPolicy
=
0
;
...
...
@@ -38,8 +61,11 @@ JNIEXPORT jboolean JNICALL Java_sun_net_www_protocol_http_ntlm_NTLMAuthenticatio
jboolean
ret
;
LPCWSTR
bstrURL
;
if
(
fn_CoInternetCreateSecurityManager
==
NULL
)
return
JNI_FALSE
;
// Create IInternetSecurityManager
hr
=
CoInternetCreateSecurityManager
(
NULL
,
&
spSecurityManager
,
(
DWORD
)
0
);
hr
=
fn_
CoInternetCreateSecurityManager
(
NULL
,
&
spSecurityManager
,
(
DWORD
)
0
);
if
(
FAILED
(
hr
))
{
return
JNI_FALSE
;
}
...
...
test/java/awt/FontClass/FontSize1Test.java
0 → 100644
浏览文件 @
a495795c
/*
* Copyright (c) 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8216965
* @summary verify no crash when rendering size 1 fonts
*/
import
java.awt.Font
;
import
java.awt.Graphics2D
;
import
java.awt.GraphicsEnvironment
;
import
java.awt.image.BufferedImage
;
public
class
FontSize1Test
{
static
final
String
text
=
"abcdefghijklmnopqrstuvwxyz"
;
public
static
void
main
(
String
[]
args
)
{
BufferedImage
bi
=
new
BufferedImage
(
100
,
20
,
BufferedImage
.
TYPE_INT_RGB
);
Graphics2D
g2d
=
bi
.
createGraphics
();
Font
af
[]
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
().
getAllFonts
();
for
(
Font
f
:
af
)
{
System
.
out
.
println
(
"Looking at font "
+
f
);
g2d
.
setFont
(
f
);
g2d
.
getFontMetrics
().
getWidths
();
g2d
.
drawString
(
text
,
50
,
10
);
}
g2d
.
dispose
();
}
}
test/java/awt/image/DrawImage/IncorrectManagedImageSourceOffset.java
0 → 100644
浏览文件 @
a495795c
/*
* Copyright (c) 2014, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
java.awt.AlphaComposite
;
import
java.awt.Color
;
import
java.awt.Graphics2D
;
import
java.awt.GraphicsConfiguration
;
import
java.awt.GraphicsEnvironment
;
import
java.awt.Image
;
import
java.awt.Transparency
;
import
java.awt.color.ColorSpace
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.ColorModel
;
import
java.awt.image.ComponentColorModel
;
import
java.awt.image.DataBuffer
;
import
java.awt.image.Raster
;
import
java.awt.image.VolatileImage
;
import
java.awt.image.WritableRaster
;
import
java.io.File
;
import
java.io.IOException
;
import
javax.imageio.ImageIO
;
import
sun.awt.image.SunWritableRaster
;
import
static
java
.
awt
.
Transparency
.
BITMASK
;
import
static
java
.
awt
.
Transparency
.
OPAQUE
;
import
static
java
.
awt
.
Transparency
.
TRANSLUCENT
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_3BYTE_BGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_4BYTE_ABGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_4BYTE_ABGR_PRE
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_BYTE_BINARY
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_BYTE_INDEXED
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_CUSTOM
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_ARGB
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_ARGB_PRE
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_BGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_RGB
;
/**
* @test
* @key headful
* @bug 8029253 6207877
* @summary Tests asymmetric source offsets when managed image is drawn to VI.
* Results of the blit to compatibleImage are used for comparison.
* @author Sergey Bylokhov
* @modules java.desktop/sun.awt.image
* @run main/othervm -Dsun.java2d.accthreshold=0 IncorrectManagedImageSourceOffset
* @run main/othervm -Dsun.java2d.accthreshold=0 -Dsun.java2d.uiScale=1 IncorrectManagedImageSourceOffset
* @run main/othervm -Dsun.java2d.accthreshold=0 -Dsun.java2d.uiScale=2 IncorrectManagedImageSourceOffset
*/
public
final
class
IncorrectManagedImageSourceOffset
{
// See the same test for unmanaged images: IncorrectUnmanagedImageSourceOffset
private
static
final
int
[]
TYPES
=
{
TYPE_INT_RGB
,
TYPE_INT_ARGB
,
TYPE_INT_ARGB_PRE
,
TYPE_INT_BGR
,
TYPE_3BYTE_BGR
,
TYPE_4BYTE_ABGR
,
TYPE_4BYTE_ABGR_PRE
,
/*TYPE_USHORT_565_RGB,
TYPE_USHORT_555_RGB, TYPE_BYTE_GRAY,
TYPE_USHORT_GRAY,*/
TYPE_BYTE_BINARY
,
TYPE_BYTE_INDEXED
,
TYPE_CUSTOM
};
private
static
final
int
[]
TRANSPARENCIES
=
{
OPAQUE
,
BITMASK
,
TRANSLUCENT
};
public
static
void
main
(
final
String
[]
args
)
throws
IOException
{
for
(
final
int
viType
:
TRANSPARENCIES
)
{
for
(
final
int
biType
:
TYPES
)
{
BufferedImage
bi
=
makeManagedBI
(
biType
);
fill
(
bi
);
test
(
bi
,
viType
);
}
}
}
private
static
void
test
(
BufferedImage
bi
,
int
type
)
throws
IOException
{
GraphicsEnvironment
ge
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
();
GraphicsConfiguration
gc
=
ge
.
getDefaultScreenDevice
()
.
getDefaultConfiguration
();
VolatileImage
vi
=
gc
.
createCompatibleVolatileImage
(
511
,
255
,
type
);
BufferedImage
gold
=
gc
.
createCompatibleImage
(
511
,
255
,
type
);
// draw to compatible Image
Graphics2D
big
=
gold
.
createGraphics
();
// force scaled blit
big
.
drawImage
(
bi
,
7
,
11
,
127
,
111
,
7
,
11
,
127
*
2
,
111
,
null
);
big
.
dispose
();
// draw to volatile image
BufferedImage
snapshot
;
while
(
true
)
{
vi
.
validate
(
gc
);
if
(
vi
.
validate
(
gc
)
!=
VolatileImage
.
IMAGE_OK
)
{
try
{
Thread
.
sleep
(
100
);
}
catch
(
final
InterruptedException
ignored
)
{
}
continue
;
}
Graphics2D
vig
=
vi
.
createGraphics
();
// force scaled blit
vig
.
drawImage
(
bi
,
7
,
11
,
127
,
111
,
7
,
11
,
127
*
2
,
111
,
null
);
vig
.
dispose
();
snapshot
=
vi
.
getSnapshot
();
if
(
vi
.
contentsLost
())
{
try
{
Thread
.
sleep
(
100
);
}
catch
(
final
InterruptedException
ignored
)
{
}
continue
;
}
break
;
}
// validate images
for
(
int
x
=
7
;
x
<
127
;
++
x
)
{
for
(
int
y
=
11
;
y
<
111
;
++
y
)
{
if
(
gold
.
getRGB
(
x
,
y
)
!=
snapshot
.
getRGB
(
x
,
y
))
{
ImageIO
.
write
(
gold
,
"png"
,
new
File
(
"gold.png"
));
ImageIO
.
write
(
snapshot
,
"png"
,
new
File
(
"bi.png"
));
throw
new
RuntimeException
(
"Test failed."
);
}
}
}
}
private
static
BufferedImage
makeManagedBI
(
final
int
type
)
{
final
BufferedImage
bi
;
if
(
type
==
TYPE_CUSTOM
)
{
bi
=
makeCustomManagedBI
();
}
else
{
bi
=
new
BufferedImage
(
511
,
255
,
type
);
}
bi
.
setAccelerationPriority
(
1.0f
);
return
bi
;
}
/**
* Returns the custom buffered image, which mostly identical to
* BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride.
* This means that the raster will have gaps, between the rows.
*/
private
static
BufferedImage
makeCustomManagedBI
()
{
int
w
=
511
,
h
=
255
;
ColorSpace
cs
=
ColorSpace
.
getInstance
(
ColorSpace
.
CS_sRGB
);
int
[]
nBits
=
{
8
,
8
,
8
};
int
[]
bOffs
=
{
2
,
1
,
0
};
ColorModel
colorModel
=
new
ComponentColorModel
(
cs
,
nBits
,
false
,
false
,
Transparency
.
OPAQUE
,
DataBuffer
.
TYPE_BYTE
);
WritableRaster
raster
=
Raster
.
createInterleavedRaster
(
DataBuffer
.
TYPE_BYTE
,
w
,
h
,
w
*
3
+
2
,
3
,
bOffs
,
null
);
BufferedImage
bi
=
new
BufferedImage
(
colorModel
,
raster
,
true
,
null
);
SunWritableRaster
.
makeTrackable
(
raster
.
getDataBuffer
());
SunWritableRaster
.
markDirty
(
bi
);
return
bi
;
}
private
static
void
fill
(
final
Image
image
)
{
final
Graphics2D
graphics
=
(
Graphics2D
)
image
.
getGraphics
();
graphics
.
setComposite
(
AlphaComposite
.
Src
);
for
(
int
i
=
0
;
i
<
image
.
getHeight
(
null
);
++
i
)
{
graphics
.
setColor
(
new
Color
(
i
,
0
,
0
));
graphics
.
fillRect
(
0
,
i
,
image
.
getWidth
(
null
),
1
);
}
graphics
.
dispose
();
}
}
test/java/awt/image/DrawImage/IncorrectUnmanagedImageSourceOffset.java
浏览文件 @
a495795c
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014,
2019,
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
...
...
@@ -27,29 +27,52 @@ import java.awt.Graphics2D;
import
java.awt.GraphicsConfiguration
;
import
java.awt.GraphicsEnvironment
;
import
java.awt.Image
;
import
java.awt.Transparency
;
import
java.awt.color.ColorSpace
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.ColorModel
;
import
java.awt.image.ComponentColorModel
;
import
java.awt.image.DataBuffer
;
import
java.awt.image.DataBufferByte
;
import
java.awt.image.DataBufferInt
;
import
java.awt.image.DataBufferShort
;
import
java.awt.image.Raster
;
import
java.awt.image.VolatileImage
;
import
java.awt.image.WritableRaster
;
import
java.io.File
;
import
java.io.IOException
;
import
javax.imageio.ImageIO
;
import
static
java
.
awt
.
Transparency
.*;
import
static
java
.
awt
.
image
.
BufferedImage
.*;
import
static
java
.
awt
.
Transparency
.
BITMASK
;
import
static
java
.
awt
.
Transparency
.
OPAQUE
;
import
static
java
.
awt
.
Transparency
.
TRANSLUCENT
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_3BYTE_BGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_4BYTE_ABGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_4BYTE_ABGR_PRE
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_BYTE_BINARY
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_BYTE_INDEXED
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_CUSTOM
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_ARGB
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_ARGB_PRE
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_BGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_RGB
;
/**
* @test
* @bug 8029253
* @key headful
* @bug 8029253 6207877
* @summary Tests asymmetric source offsets when unmanaged image is drawn to VI.
* Results of the blit to compatibleImage are used for comparison.
* @author Sergey Bylokhov
* @run main/othervm IncorrectUnmanagedImageSourceOffset
* @run main/othervm -Dsun.java2d.uiScale=1 IncorrectUnmanagedImageSourceOffset
* @run main/othervm -Dsun.java2d.uiScale=2 IncorrectUnmanagedImageSourceOffset
*/
public
final
class
IncorrectUnmanagedImageSourceOffset
{
// See the same test for managed images: IncorrectManagedImageSourceOffset
private
static
final
int
[]
TYPES
=
{
TYPE_INT_RGB
,
TYPE_INT_ARGB
,
TYPE_INT_ARGB_PRE
,
TYPE_INT_BGR
,
TYPE_3BYTE_BGR
,
TYPE_4BYTE_ABGR
,
...
...
@@ -57,7 +80,7 @@ public final class IncorrectUnmanagedImageSourceOffset {
/*TYPE_USHORT_565_RGB,
TYPE_USHORT_555_RGB, TYPE_BYTE_GRAY,
TYPE_USHORT_GRAY,*/
TYPE_BYTE_BINARY
,
TYPE_BYTE_INDEXED
};
TYPE_BYTE_INDEXED
,
TYPE_CUSTOM
};
private
static
final
int
[]
TRANSPARENCIES
=
{
OPAQUE
,
BITMASK
,
TRANSLUCENT
};
public
static
void
main
(
final
String
[]
args
)
throws
IOException
{
...
...
@@ -121,7 +144,12 @@ public final class IncorrectUnmanagedImageSourceOffset {
}
private
static
BufferedImage
makeUnmanagedBI
(
final
int
type
)
{
final
BufferedImage
bi
=
new
BufferedImage
(
511
,
255
,
type
);
final
BufferedImage
bi
;
if
(
type
==
TYPE_CUSTOM
)
{
bi
=
makeCustomUnmanagedBI
();
}
else
{
bi
=
new
BufferedImage
(
511
,
255
,
type
);
}
final
DataBuffer
db
=
bi
.
getRaster
().
getDataBuffer
();
if
(
db
instanceof
DataBufferInt
)
{
((
DataBufferInt
)
db
).
getData
();
...
...
@@ -129,15 +157,30 @@ public final class IncorrectUnmanagedImageSourceOffset {
((
DataBufferShort
)
db
).
getData
();
}
else
if
(
db
instanceof
DataBufferByte
)
{
((
DataBufferByte
)
db
).
getData
();
}
else
{
try
{
bi
.
setAccelerationPriority
(
0.0f
);
}
catch
(
final
Throwable
ignored
)
{
}
}
bi
.
setAccelerationPriority
(
0.0f
);
return
bi
;
}
/**
* Returns the custom buffered image, which mostly identical to
* BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride.
* This means that the raster will have gaps, between the rows.
*/
private
static
BufferedImage
makeCustomUnmanagedBI
()
{
int
w
=
511
,
h
=
255
;
ColorSpace
cs
=
ColorSpace
.
getInstance
(
ColorSpace
.
CS_sRGB
);
int
[]
nBits
=
{
8
,
8
,
8
};
int
[]
bOffs
=
{
2
,
1
,
0
};
ColorModel
colorModel
=
new
ComponentColorModel
(
cs
,
nBits
,
false
,
false
,
Transparency
.
OPAQUE
,
DataBuffer
.
TYPE_BYTE
);
WritableRaster
raster
=
Raster
.
createInterleavedRaster
(
DataBuffer
.
TYPE_BYTE
,
w
,
h
,
w
*
3
+
2
,
3
,
bOffs
,
null
);
return
new
BufferedImage
(
colorModel
,
raster
,
true
,
null
);
}
private
static
void
fill
(
final
Image
image
)
{
final
Graphics2D
graphics
=
(
Graphics2D
)
image
.
getGraphics
();
graphics
.
setComposite
(
AlphaComposite
.
Src
);
...
...
test/java/awt/image/DrawImage/SimpleManagedImage.java
0 → 100644
浏览文件 @
a495795c
/*
* Copyright (c) 2014, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
java.awt.AlphaComposite
;
import
java.awt.Color
;
import
java.awt.Graphics2D
;
import
java.awt.GraphicsConfiguration
;
import
java.awt.GraphicsEnvironment
;
import
java.awt.Image
;
import
java.awt.Transparency
;
import
java.awt.color.ColorSpace
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.ColorModel
;
import
java.awt.image.ComponentColorModel
;
import
java.awt.image.DataBuffer
;
import
java.awt.image.Raster
;
import
java.awt.image.VolatileImage
;
import
java.awt.image.WritableRaster
;
import
java.io.File
;
import
java.io.IOException
;
import
javax.imageio.ImageIO
;
import
sun.awt.image.SunWritableRaster
;
import
static
java
.
awt
.
Transparency
.
BITMASK
;
import
static
java
.
awt
.
Transparency
.
OPAQUE
;
import
static
java
.
awt
.
Transparency
.
TRANSLUCENT
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_3BYTE_BGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_4BYTE_ABGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_4BYTE_ABGR_PRE
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_BYTE_BINARY
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_BYTE_INDEXED
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_CUSTOM
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_ARGB
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_ARGB_PRE
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_BGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_RGB
;
/**
* @test
* @key headful
* @bug 8029253 6207877
* @summary Tests the case when managed image is drawn to VI.
* Results of the blit to compatibleImage are used for comparison.
* @author Sergey Bylokhov
* @modules java.desktop/sun.awt.image
* @run main/othervm -Dsun.java2d.accthreshold=0 SimpleManagedImage
* @run main/othervm -Dsun.java2d.accthreshold=0 -Dsun.java2d.uiScale=1 SimpleManagedImage
* @run main/othervm -Dsun.java2d.accthreshold=0 -Dsun.java2d.uiScale=2 SimpleManagedImage
*/
public
final
class
SimpleManagedImage
{
// See the same test for unmanaged images: SimpleUnmanagedImage
private
static
final
int
[]
TYPES
=
{
TYPE_INT_RGB
,
TYPE_INT_ARGB
,
TYPE_INT_ARGB_PRE
,
TYPE_INT_BGR
,
TYPE_3BYTE_BGR
,
TYPE_4BYTE_ABGR
,
TYPE_4BYTE_ABGR_PRE
,
/*TYPE_USHORT_565_RGB,
TYPE_USHORT_555_RGB, TYPE_BYTE_GRAY,
TYPE_USHORT_GRAY,*/
TYPE_BYTE_BINARY
,
TYPE_BYTE_INDEXED
,
TYPE_CUSTOM
};
private
static
final
int
[]
TRANSPARENCIES
=
{
OPAQUE
,
BITMASK
,
TRANSLUCENT
};
public
static
void
main
(
final
String
[]
args
)
throws
IOException
{
for
(
final
int
viType
:
TRANSPARENCIES
)
{
for
(
final
int
biType
:
TYPES
)
{
BufferedImage
bi
=
makeManagedBI
(
biType
);
fill
(
bi
);
test
(
bi
,
viType
);
}
}
}
private
static
void
test
(
BufferedImage
bi
,
int
type
)
throws
IOException
{
GraphicsEnvironment
ge
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
();
GraphicsConfiguration
gc
=
ge
.
getDefaultScreenDevice
()
.
getDefaultConfiguration
();
VolatileImage
vi
=
gc
.
createCompatibleVolatileImage
(
1000
,
1000
,
type
);
BufferedImage
gold
=
gc
.
createCompatibleImage
(
1000
,
1000
,
type
);
// draw to compatible Image
init
(
gold
);
Graphics2D
big
=
gold
.
createGraphics
();
big
.
drawImage
(
bi
,
7
,
11
,
null
);
big
.
dispose
();
// draw to volatile image
BufferedImage
snapshot
;
while
(
true
)
{
vi
.
validate
(
gc
);
if
(
vi
.
validate
(
gc
)
!=
VolatileImage
.
IMAGE_OK
)
{
try
{
Thread
.
sleep
(
100
);
}
catch
(
final
InterruptedException
ignored
)
{
}
continue
;
}
init
(
vi
);
Graphics2D
vig
=
vi
.
createGraphics
();
vig
.
drawImage
(
bi
,
7
,
11
,
null
);
vig
.
dispose
();
snapshot
=
vi
.
getSnapshot
();
if
(
vi
.
contentsLost
())
{
try
{
Thread
.
sleep
(
100
);
}
catch
(
final
InterruptedException
ignored
)
{
}
continue
;
}
break
;
}
// validate images
for
(
int
x
=
0
;
x
<
1000
;
++
x
)
{
for
(
int
y
=
0
;
y
<
1000
;
++
y
)
{
if
(
gold
.
getRGB
(
x
,
y
)
!=
snapshot
.
getRGB
(
x
,
y
))
{
ImageIO
.
write
(
gold
,
"png"
,
new
File
(
"gold.png"
));
ImageIO
.
write
(
snapshot
,
"png"
,
new
File
(
"bi.png"
));
throw
new
RuntimeException
(
"Test failed."
);
}
}
}
}
private
static
BufferedImage
makeManagedBI
(
final
int
type
)
{
final
BufferedImage
bi
;
if
(
type
==
TYPE_CUSTOM
)
{
bi
=
makeCustomManagedBI
();
}
else
{
bi
=
new
BufferedImage
(
511
,
255
,
type
);
}
bi
.
setAccelerationPriority
(
1.0f
);
return
bi
;
}
/**
* Returns the custom buffered image, which mostly identical to
* BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride.
* This means that the raster will have gaps, between the rows.
*/
private
static
BufferedImage
makeCustomManagedBI
()
{
int
w
=
511
,
h
=
255
;
ColorSpace
cs
=
ColorSpace
.
getInstance
(
ColorSpace
.
CS_sRGB
);
int
[]
nBits
=
{
8
,
8
,
8
};
int
[]
bOffs
=
{
2
,
1
,
0
};
ColorModel
colorModel
=
new
ComponentColorModel
(
cs
,
nBits
,
false
,
false
,
Transparency
.
OPAQUE
,
DataBuffer
.
TYPE_BYTE
);
WritableRaster
raster
=
Raster
.
createInterleavedRaster
(
DataBuffer
.
TYPE_BYTE
,
w
,
h
,
w
*
3
+
2
,
3
,
bOffs
,
null
);
BufferedImage
bi
=
new
BufferedImage
(
colorModel
,
raster
,
true
,
null
);
SunWritableRaster
.
makeTrackable
(
raster
.
getDataBuffer
());
SunWritableRaster
.
markDirty
(
bi
);
return
bi
;
}
private
static
void
init
(
final
Image
image
)
{
final
Graphics2D
graphics
=
(
Graphics2D
)
image
.
getGraphics
();
graphics
.
setComposite
(
AlphaComposite
.
Src
);
graphics
.
setColor
(
new
Color
(
0
,
0
,
0
,
0
));
graphics
.
fillRect
(
0
,
0
,
image
.
getWidth
(
null
),
image
.
getHeight
(
null
));
graphics
.
dispose
();
}
private
static
void
fill
(
final
Image
image
)
{
final
Graphics2D
graphics
=
(
Graphics2D
)
image
.
getGraphics
();
graphics
.
setComposite
(
AlphaComposite
.
Src
);
for
(
int
i
=
0
;
i
<
image
.
getHeight
(
null
);
++
i
)
{
graphics
.
setColor
(
new
Color
(
i
,
0
,
0
));
graphics
.
fillRect
(
0
,
i
,
image
.
getWidth
(
null
),
1
);
}
graphics
.
dispose
();
}
}
test/java/awt/image/DrawImage/SimpleUnmanagedImage.java
0 → 100644
浏览文件 @
a495795c
/*
* Copyright (c) 2014, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import
java.awt.AlphaComposite
;
import
java.awt.Color
;
import
java.awt.Graphics2D
;
import
java.awt.GraphicsConfiguration
;
import
java.awt.GraphicsEnvironment
;
import
java.awt.Image
;
import
java.awt.Transparency
;
import
java.awt.color.ColorSpace
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.ColorModel
;
import
java.awt.image.ComponentColorModel
;
import
java.awt.image.DataBuffer
;
import
java.awt.image.DataBufferByte
;
import
java.awt.image.DataBufferInt
;
import
java.awt.image.DataBufferShort
;
import
java.awt.image.Raster
;
import
java.awt.image.VolatileImage
;
import
java.awt.image.WritableRaster
;
import
java.io.File
;
import
java.io.IOException
;
import
javax.imageio.ImageIO
;
import
static
java
.
awt
.
Transparency
.
BITMASK
;
import
static
java
.
awt
.
Transparency
.
OPAQUE
;
import
static
java
.
awt
.
Transparency
.
TRANSLUCENT
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_3BYTE_BGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_4BYTE_ABGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_4BYTE_ABGR_PRE
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_BYTE_BINARY
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_BYTE_INDEXED
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_CUSTOM
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_ARGB
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_ARGB_PRE
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_BGR
;
import
static
java
.
awt
.
image
.
BufferedImage
.
TYPE_INT_RGB
;
/**
* @test
* @key headful
* @bug 8029253 6207877
* @summary Tests the case when unmanaged image is drawn to VI.
* Results of the blit to compatibleImage are used for comparison.
* @author Sergey Bylokhov
* @run main/othervm SimpleUnmanagedImage
* @run main/othervm -Dsun.java2d.uiScale=1 SimpleUnmanagedImage
* @run main/othervm -Dsun.java2d.uiScale=2 SimpleUnmanagedImage
*/
public
final
class
SimpleUnmanagedImage
{
// See the same test for managed images: SimpleManagedImage
private
static
final
int
[]
TYPES
=
{
TYPE_INT_RGB
,
TYPE_INT_ARGB
,
TYPE_INT_ARGB_PRE
,
TYPE_INT_BGR
,
TYPE_3BYTE_BGR
,
TYPE_4BYTE_ABGR
,
TYPE_4BYTE_ABGR_PRE
,
/*TYPE_USHORT_565_RGB,
TYPE_USHORT_555_RGB, TYPE_BYTE_GRAY,
TYPE_USHORT_GRAY,*/
TYPE_BYTE_BINARY
,
TYPE_BYTE_INDEXED
,
TYPE_CUSTOM
};
private
static
final
int
[]
TRANSPARENCIES
=
{
OPAQUE
,
BITMASK
,
TRANSLUCENT
};
public
static
void
main
(
final
String
[]
args
)
throws
IOException
{
for
(
final
int
viType
:
TRANSPARENCIES
)
{
for
(
final
int
biType
:
TYPES
)
{
BufferedImage
bi
=
makeUnmanagedBI
(
biType
);
fill
(
bi
);
test
(
bi
,
viType
);
}
}
}
private
static
void
test
(
BufferedImage
bi
,
int
type
)
throws
IOException
{
GraphicsEnvironment
ge
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
();
GraphicsConfiguration
gc
=
ge
.
getDefaultScreenDevice
()
.
getDefaultConfiguration
();
VolatileImage
vi
=
gc
.
createCompatibleVolatileImage
(
1000
,
1000
,
type
);
BufferedImage
gold
=
gc
.
createCompatibleImage
(
1000
,
1000
,
type
);
// draw to compatible Image
init
(
gold
);
Graphics2D
big
=
gold
.
createGraphics
();
big
.
drawImage
(
bi
,
7
,
11
,
null
);
big
.
dispose
();
// draw to volatile image
BufferedImage
snapshot
;
while
(
true
)
{
vi
.
validate
(
gc
);
if
(
vi
.
validate
(
gc
)
!=
VolatileImage
.
IMAGE_OK
)
{
try
{
Thread
.
sleep
(
100
);
}
catch
(
final
InterruptedException
ignored
)
{
}
continue
;
}
init
(
vi
);
Graphics2D
vig
=
vi
.
createGraphics
();
vig
.
drawImage
(
bi
,
7
,
11
,
null
);
vig
.
dispose
();
snapshot
=
vi
.
getSnapshot
();
if
(
vi
.
contentsLost
())
{
try
{
Thread
.
sleep
(
100
);
}
catch
(
final
InterruptedException
ignored
)
{
}
continue
;
}
break
;
}
// validate images
for
(
int
x
=
0
;
x
<
1000
;
++
x
)
{
for
(
int
y
=
0
;
y
<
1000
;
++
y
)
{
if
(
gold
.
getRGB
(
x
,
y
)
!=
snapshot
.
getRGB
(
x
,
y
))
{
ImageIO
.
write
(
gold
,
"png"
,
new
File
(
"gold.png"
));
ImageIO
.
write
(
snapshot
,
"png"
,
new
File
(
"bi.png"
));
throw
new
RuntimeException
(
"Test failed."
);
}
}
}
}
private
static
BufferedImage
makeUnmanagedBI
(
final
int
type
)
{
final
BufferedImage
bi
;
if
(
type
==
TYPE_CUSTOM
)
{
bi
=
makeCustomUnmanagedBI
();
}
else
{
bi
=
new
BufferedImage
(
511
,
255
,
type
);
}
final
DataBuffer
db
=
bi
.
getRaster
().
getDataBuffer
();
if
(
db
instanceof
DataBufferInt
)
{
((
DataBufferInt
)
db
).
getData
();
}
else
if
(
db
instanceof
DataBufferShort
)
{
((
DataBufferShort
)
db
).
getData
();
}
else
if
(
db
instanceof
DataBufferByte
)
{
((
DataBufferByte
)
db
).
getData
();
}
bi
.
setAccelerationPriority
(
0.0f
);
return
bi
;
}
/**
* Returns the custom buffered image, which mostly identical to
* BufferedImage.(w,h,TYPE_3BYTE_BGR), but uses the bigger scanlineStride.
* This means that the raster will have gaps, between the rows.
*/
private
static
BufferedImage
makeCustomUnmanagedBI
()
{
int
w
=
511
,
h
=
255
;
ColorSpace
cs
=
ColorSpace
.
getInstance
(
ColorSpace
.
CS_sRGB
);
int
[]
nBits
=
{
8
,
8
,
8
};
int
[]
bOffs
=
{
2
,
1
,
0
};
ColorModel
colorModel
=
new
ComponentColorModel
(
cs
,
nBits
,
false
,
false
,
Transparency
.
OPAQUE
,
DataBuffer
.
TYPE_BYTE
);
WritableRaster
raster
=
Raster
.
createInterleavedRaster
(
DataBuffer
.
TYPE_BYTE
,
w
,
h
,
w
*
3
+
2
,
3
,
bOffs
,
null
);
return
new
BufferedImage
(
colorModel
,
raster
,
true
,
null
);
}
private
static
void
init
(
final
Image
image
)
{
final
Graphics2D
graphics
=
(
Graphics2D
)
image
.
getGraphics
();
graphics
.
setComposite
(
AlphaComposite
.
Src
);
graphics
.
setColor
(
new
Color
(
0
,
0
,
0
,
0
));
graphics
.
fillRect
(
0
,
0
,
image
.
getWidth
(
null
),
image
.
getHeight
(
null
));
graphics
.
dispose
();
}
private
static
void
fill
(
final
Image
image
)
{
final
Graphics2D
graphics
=
(
Graphics2D
)
image
.
getGraphics
();
graphics
.
setComposite
(
AlphaComposite
.
Src
);
for
(
int
i
=
0
;
i
<
image
.
getHeight
(
null
);
++
i
)
{
graphics
.
setColor
(
new
Color
(
i
,
0
,
0
));
graphics
.
fillRect
(
0
,
i
,
image
.
getWidth
(
null
),
1
);
}
graphics
.
dispose
();
}
}
test/java/io/FilePermission/Invalid.java
0 → 100644
浏览文件 @
a495795c
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
*
* @test
* @bug 8167646
* @summary Better invalid FilePermission
* @library /lib/testlibrary
*/
import
jdk.testlibrary.Asserts
;
import
java.io.FilePermission
;
public
class
Invalid
{
public
static
void
main
(
String
args
[])
throws
Exception
{
// Normal
FilePermission
fp
=
new
FilePermission
(
"a"
,
"read"
);
// Invalid
FilePermission
fp1
=
new
FilePermission
(
"a\000"
,
"read"
);
FilePermission
fp2
=
new
FilePermission
(
"a\000"
,
"read"
);
FilePermission
fp3
=
new
FilePermission
(
"b\000"
,
"read"
);
// Invalid equals to itself
Asserts
.
assertEQ
(
fp1
,
fp1
);
// and not equals to anything else, including other invalid ones
Asserts
.
assertNE
(
fp
,
fp1
);
Asserts
.
assertNE
(
fp1
,
fp
);
Asserts
.
assertNE
(
fp1
,
fp2
);
Asserts
.
assertNE
(
fp1
,
fp3
);
// Invalid implies itself
Asserts
.
assertTrue
(
fp1
.
implies
(
fp1
));
// and not implies or implied by anything else, including other
// invalid ones
Asserts
.
assertFalse
(
fp
.
implies
(
fp1
));
Asserts
.
assertFalse
(
fp1
.
implies
(
fp
));
Asserts
.
assertFalse
(
fp1
.
implies
(
fp2
));
Asserts
.
assertFalse
(
fp1
.
implies
(
fp3
));
}
}
test/java/rmi/testlibrary/TestSocketFactory.java
浏览文件 @
a495795c
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017,
2019,
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
...
...
@@ -92,7 +92,8 @@ public class TestSocketFactory extends RMISocketFactory
static
final
byte
[]
EMPTY_BYTE_ARRAY
=
new
byte
[
0
];
public
static
final
boolean
DEBUG
=
false
;
// True to enable logging of matches and replacements.
private
static
volatile
boolean
debugLogging
=
false
;
/**
* Debugging output can be synchronized with logging of RMI actions.
...
...
@@ -100,8 +101,8 @@ public class TestSocketFactory extends RMISocketFactory
* @param format a printf format
* @param args any args
*/
p
rivate
static
void
DEBUG
(
String
format
,
Object
...
args
)
{
if
(
DEBUG
)
{
p
ublic
static
void
DEBUG
(
String
format
,
Object
...
args
)
{
if
(
debugLogging
)
{
System
.
err
.
printf
(
format
,
args
);
}
}
...
...
@@ -116,6 +117,17 @@ public class TestSocketFactory extends RMISocketFactory
this
.
replaceBytes
=
EMPTY_BYTE_ARRAY
;
}
/**
* Set debug to true to generate logging output of matches and substitutions.
* @param debug {@code true} to generate logging output
* @return the previous value
*/
public
static
boolean
setDebug
(
boolean
debug
)
{
boolean
oldDebug
=
debugLogging
;
debugLogging
=
debug
;
return
oldDebug
;
}
/**
* Set the match and replacement bytes, with an empty trigger.
* The match and replacements are propagated to all existing sockets.
...
...
test/java/util/TimeZone/TimeZoneTest.java
浏览文件 @
a495795c
/*
* Copyright (c) 1997, 201
6
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
9
, 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
...
...
@@ -24,8 +24,7 @@
/*
* @test
* @bug 4028006 4044013 4096694 4107276 4107570 4112869 4130885 7039469 7126465 7158483
* 8008577 8077685 8098547 8133321 8138716 8148446 8151876
* @modules java.base/sun.util.resources
* 8008577 8077685 8098547 8133321 8138716 8148446 8151876 8228469
* @library /java/text/testlib
* @summary test TimeZone
*/
...
...
@@ -113,7 +112,7 @@ public class TimeZoneTest extends IntlTest
new
ZoneDescriptor
(
"PRT"
,
-
240
,
false
),
new
ZoneDescriptor
(
"CNT"
,
-
210
,
true
),
new
ZoneDescriptor
(
"AGT"
,
-
180
,
false
),
new
ZoneDescriptor
(
"BET"
,
-
180
,
tru
e
),
new
ZoneDescriptor
(
"BET"
,
-
180
,
fals
e
),
// new ZoneDescriptor("CAT", -60, false), // Wrong:
// As of bug 4130885, fix CAT (Central Africa)
new
ZoneDescriptor
(
"CAT"
,
120
,
false
),
// Africa/Harare
...
...
test/lib/testlibrary/jdk/testlibrary/net/URIBuilder.java
0 → 100644
浏览文件 @
a495795c
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Google 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package
jdk.testlibrary.net
;
import
java.net.InetAddress
;
import
java.net.MalformedURLException
;
import
java.net.URI
;
import
java.net.URISyntaxException
;
import
java.net.URL
;
public
class
URIBuilder
{
public
static
URIBuilder
newBuilder
()
{
return
new
URIBuilder
();
}
private
String
scheme
;
private
String
userInfo
;
private
String
host
;
private
int
port
;
private
String
path
;
private
String
query
;
private
String
fragment
;
private
URIBuilder
()
{}
public
URIBuilder
scheme
(
String
scheme
)
{
this
.
scheme
=
scheme
;
return
this
;
}
public
URIBuilder
userInfo
(
String
userInfo
)
{
this
.
userInfo
=
userInfo
;
return
this
;
}
public
URIBuilder
host
(
String
host
)
{
this
.
host
=
host
;
return
this
;
}
public
URIBuilder
loopback
()
{
return
host
(
InetAddress
.
getLoopbackAddress
().
getHostAddress
());
}
public
URIBuilder
port
(
int
port
)
{
this
.
port
=
port
;
return
this
;
}
public
URIBuilder
path
(
String
path
)
{
this
.
path
=
path
;
return
this
;
}
public
URIBuilder
query
(
String
query
)
{
this
.
query
=
query
;
return
this
;
}
public
URIBuilder
fragment
(
String
fragment
)
{
this
.
fragment
=
fragment
;
return
this
;
}
public
URI
build
()
throws
URISyntaxException
{
return
new
URI
(
scheme
,
userInfo
,
host
,
port
,
path
,
query
,
fragment
);
}
public
URI
buildUnchecked
()
{
try
{
return
build
();
}
catch
(
URISyntaxException
e
)
{
throw
new
IllegalArgumentException
(
e
);
}
}
public
URL
toURL
()
throws
URISyntaxException
,
MalformedURLException
{
return
build
().
toURL
();
}
public
URL
toURLUnchecked
()
{
try
{
return
toURL
();
}
catch
(
URISyntaxException
|
MalformedURLException
e
)
{
throw
new
IllegalArgumentException
(
e
);
}
}
}
test/sun/net/www/protocol/http/TestTransparentNTLM.java
0 → 100644
浏览文件 @
a495795c
/*
* Copyright (c) 2018, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8225425
* @summary Verifies that transparent NTLM (on Windows) is not used by default,
* and is used only when the relevant property is set.
* @requires os.family == "windows"
* @library ../../../../../lib/testlibrary
* @run testng/othervm
* -Dtest.auth.succeed=false
* TestTransparentNTLM
* @run testng/othervm
* -Djdk.http.ntlm.transparentAuth=allHosts
* -Dtest.auth.succeed=true
* TestTransparentNTLM
* @run testng/othervm
* -Djdk.http.ntlm.transparentAuth=blahblah
* -Dtest.auth.succeed=false
* TestTransparentNTLM
* @run testng/othervm
* -Djdk.http.ntlm.transparentAuth=trustedHosts
* -Dtest.auth.succeed=false
* TestTransparentNTLM
*/
// Run with `trustedHosts` to exercise the native code, nothing more.
import
java.io.BufferedReader
;
import
java.io.Closeable
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.net.HttpURLConnection
;
import
java.net.InetAddress
;
import
java.net.InetSocketAddress
;
import
java.net.ServerSocket
;
import
java.net.Socket
;
import
java.net.URL
;
import
jdk.testlibrary.net.URIBuilder
;
import
org.testng.annotations.AfterTest
;
import
org.testng.annotations.BeforeTest
;
import
org.testng.annotations.Test
;
import
org.testng.SkipException
;
import
static
java
.
lang
.
System
.
out
;
import
static
java
.
net
.
Proxy
.
NO_PROXY
;
import
static
java
.
nio
.
charset
.
StandardCharsets
.
UTF_8
;
import
static
org
.
testng
.
Assert
.
assertEquals
;
import
static
org
.
testng
.
Assert
.
fail
;
public
class
TestTransparentNTLM
{
boolean
succeed
;
// true if authentication is expected to succeed
Server
server
;
URL
url
;
@Test
public
void
testNTLM
()
throws
IOException
{
out
.
println
(
"connecting to url: "
+
url
);
HttpURLConnection
uc
=
(
HttpURLConnection
)
url
.
openConnection
(
NO_PROXY
);
int
respCode
=
uc
.
getResponseCode
();
out
.
println
(
"received: "
+
respCode
);
if
(
succeed
)
{
assertEquals
(
respCode
,
HttpURLConnection
.
HTTP_OK
);
InputStream
is
=
uc
.
getInputStream
();
BufferedReader
r
=
new
BufferedReader
(
new
InputStreamReader
(
is
,
UTF_8
));
String
body
=
r
.
readLine
();
out
.
print
(
"received body: "
);
do
{
out
.
print
(
body
);
body
=
r
.
readLine
();
}
while
(
body
!=
null
);
}
else
{
assertEquals
(
respCode
,
HttpURLConnection
.
HTTP_UNAUTHORIZED
);
}
}
static
class
Server
extends
Thread
implements
Closeable
{
static
final
InetAddress
LOOPBACK
=
InetAddress
.
getLoopbackAddress
();
final
ServerSocket
serverSocket
;
final
boolean
expectAuthToSucceed
;
Server
(
boolean
expectAuthToSucceed
)
throws
IOException
{
super
(
"TestTransparentNTLM-Server"
);
serverSocket
=
new
ServerSocket
();
serverSocket
.
bind
(
new
InetSocketAddress
(
LOOPBACK
,
0
));
this
.
expectAuthToSucceed
=
expectAuthToSucceed
;
}
int
port
()
{
return
serverSocket
.
getLocalPort
();
}
static
final
String
AUTH_REQUIRED
=
"HTTP/1.1 401 Unauthorized\r\n"
+
"Content-Length: 0\r\n"
+
"Connection: close\r\n"
+
"WWW-Authenticate: NTLM\r\n\r\n"
;
static
final
String
AUTH_STAGE_TWO
=
"HTTP/1.1 401 Unauthorized\r\n"
+
"Content-Length: 0\r\n"
+
"WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAAAAACgAAAABggAAU3J2Tm9uY2UAAAAAAAAAAA==\r\n\r\n"
;
static
final
String
AUTH_SUCCESSFUL
=
"HTTP/1.1 200 OK\r\n"
+
"Content-Length: 11\r\n\r\n"
+
"Hello world"
;
@Override
public
void
run
()
{
try
{
try
(
Socket
s
=
serverSocket
.
accept
())
{
out
.
println
(
"Server accepted connection - 1"
);
readRequestHeaders
(
s
.
getInputStream
());
s
.
getOutputStream
().
write
(
AUTH_REQUIRED
.
getBytes
(
UTF_8
));
}
if
(
expectAuthToSucceed
)
{
// await the second follow up connection
try
(
Socket
s
=
serverSocket
.
accept
())
{
out
.
println
(
"Server accepted connection - 2"
);
readRequestHeaders
(
s
.
getInputStream
());
s
.
getOutputStream
().
write
(
AUTH_STAGE_TWO
.
getBytes
(
UTF_8
));
readRequestHeaders
(
s
.
getInputStream
());
s
.
getOutputStream
().
write
(
AUTH_SUCCESSFUL
.
getBytes
(
UTF_8
));
}
}
}
catch
(
IOException
e
)
{
fail
(
"Unexpected exception"
,
e
);
}
}
@Override
public
void
close
()
throws
IOException
{
serverSocket
.
close
();
}
static
final
byte
[]
REQUEST_END
=
new
byte
[]
{
'\r'
,
'\n'
,
'\r'
,
'\n'
};
// Read until the end of the HTTP request headers
static
void
readRequestHeaders
(
InputStream
is
)
throws
IOException
{
int
requestEndCount
=
0
,
r
;
while
((
r
=
is
.
read
())
!=
-
1
)
{
if
(
r
==
REQUEST_END
[
requestEndCount
])
{
requestEndCount
++;
if
(
requestEndCount
==
4
)
{
break
;
}
}
else
{
requestEndCount
=
0
;
}
}
}
}
@BeforeTest
public
void
setup
()
throws
Exception
{
succeed
=
System
.
getProperty
(
"test.auth.succeed"
).
equals
(
"true"
);
if
(
succeed
)
out
.
println
(
"Expect client to succeed, with 200 Ok"
);
else
out
.
println
(
"Expect client to fail, with 401 Unauthorized"
);
server
=
new
Server
(
succeed
);
server
.
start
();
url
=
URIBuilder
.
newBuilder
()
.
scheme
(
"http"
)
.
loopback
()
.
port
(
server
.
port
())
.
path
(
"/xxyyzz"
)
.
toURL
();
}
@AfterTest
public
void
teardown
()
throws
Exception
{
server
.
close
();
server
.
join
();
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录