tzinfo 1.2.6 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +1 -1
  4. data/.yardopts +3 -0
  5. data/CHANGES.md +482 -380
  6. data/LICENSE +12 -12
  7. data/README.md +368 -114
  8. data/lib/tzinfo.rb +64 -29
  9. data/lib/tzinfo/country.rb +141 -129
  10. data/lib/tzinfo/country_timezone.rb +70 -112
  11. data/lib/tzinfo/data_source.rb +389 -144
  12. data/lib/tzinfo/data_sources.rb +8 -0
  13. data/lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb +56 -0
  14. data/lib/tzinfo/data_sources/country_info.rb +42 -0
  15. data/lib/tzinfo/data_sources/data_timezone_info.rb +91 -0
  16. data/lib/tzinfo/data_sources/linked_timezone_info.rb +33 -0
  17. data/lib/tzinfo/data_sources/ruby_data_source.rb +143 -0
  18. data/lib/tzinfo/data_sources/timezone_info.rb +47 -0
  19. data/lib/tzinfo/data_sources/transitions_data_timezone_info.rb +214 -0
  20. data/lib/tzinfo/data_sources/zoneinfo_data_source.rb +575 -0
  21. data/lib/tzinfo/data_sources/zoneinfo_reader.rb +286 -0
  22. data/lib/tzinfo/data_timezone.rb +33 -47
  23. data/lib/tzinfo/datetime_with_offset.rb +153 -0
  24. data/lib/tzinfo/format1.rb +10 -0
  25. data/lib/tzinfo/format1/country_definer.rb +17 -0
  26. data/lib/tzinfo/format1/country_index_definition.rb +64 -0
  27. data/lib/tzinfo/format1/timezone_definer.rb +64 -0
  28. data/lib/tzinfo/format1/timezone_definition.rb +39 -0
  29. data/lib/tzinfo/format1/timezone_index_definition.rb +77 -0
  30. data/lib/tzinfo/format2.rb +10 -0
  31. data/lib/tzinfo/format2/country_definer.rb +68 -0
  32. data/lib/tzinfo/format2/country_index_definer.rb +68 -0
  33. data/lib/tzinfo/format2/country_index_definition.rb +46 -0
  34. data/lib/tzinfo/format2/timezone_definer.rb +94 -0
  35. data/lib/tzinfo/format2/timezone_definition.rb +73 -0
  36. data/lib/tzinfo/format2/timezone_index_definer.rb +45 -0
  37. data/lib/tzinfo/format2/timezone_index_definition.rb +55 -0
  38. data/lib/tzinfo/info_timezone.rb +26 -21
  39. data/lib/tzinfo/linked_timezone.rb +33 -52
  40. data/lib/tzinfo/offset_timezone_period.rb +42 -0
  41. data/lib/tzinfo/string_deduper.rb +118 -0
  42. data/lib/tzinfo/time_with_offset.rb +128 -0
  43. data/lib/tzinfo/timestamp.rb +548 -0
  44. data/lib/tzinfo/timestamp_with_offset.rb +85 -0
  45. data/lib/tzinfo/timezone.rb +989 -502
  46. data/lib/tzinfo/timezone_offset.rb +84 -74
  47. data/lib/tzinfo/timezone_period.rb +151 -217
  48. data/lib/tzinfo/timezone_proxy.rb +70 -79
  49. data/lib/tzinfo/timezone_transition.rb +77 -109
  50. data/lib/tzinfo/transitions_timezone_period.rb +63 -0
  51. data/lib/tzinfo/untaint_ext.rb +18 -0
  52. data/lib/tzinfo/version.rb +7 -0
  53. data/lib/tzinfo/with_offset.rb +61 -0
  54. metadata +43 -99
  55. metadata.gz.sig +0 -0
  56. data/Rakefile +0 -107
  57. data/lib/tzinfo/country_index_definition.rb +0 -31
  58. data/lib/tzinfo/country_info.rb +0 -42
  59. data/lib/tzinfo/data_timezone_info.rb +0 -55
  60. data/lib/tzinfo/linked_timezone_info.rb +0 -26
  61. data/lib/tzinfo/offset_rationals.rb +0 -77
  62. data/lib/tzinfo/ruby_core_support.rb +0 -176
  63. data/lib/tzinfo/ruby_country_info.rb +0 -74
  64. data/lib/tzinfo/ruby_data_source.rb +0 -138
  65. data/lib/tzinfo/time_or_datetime.rb +0 -340
  66. data/lib/tzinfo/timezone_definition.rb +0 -36
  67. data/lib/tzinfo/timezone_index_definition.rb +0 -54
  68. data/lib/tzinfo/timezone_info.rb +0 -30
  69. data/lib/tzinfo/timezone_transition_definition.rb +0 -104
  70. data/lib/tzinfo/transition_data_timezone_info.rb +0 -274
  71. data/lib/tzinfo/zoneinfo_country_info.rb +0 -37
  72. data/lib/tzinfo/zoneinfo_data_source.rb +0 -496
  73. data/lib/tzinfo/zoneinfo_timezone_info.rb +0 -298
  74. data/test/tc_country.rb +0 -236
  75. data/test/tc_country_index_definition.rb +0 -69
  76. data/test/tc_country_info.rb +0 -16
  77. data/test/tc_country_timezone.rb +0 -173
  78. data/test/tc_data_source.rb +0 -218
  79. data/test/tc_data_timezone.rb +0 -99
  80. data/test/tc_data_timezone_info.rb +0 -18
  81. data/test/tc_info_timezone.rb +0 -34
  82. data/test/tc_linked_timezone.rb +0 -155
  83. data/test/tc_linked_timezone_info.rb +0 -23
  84. data/test/tc_offset_rationals.rb +0 -23
  85. data/test/tc_ruby_core_support.rb +0 -168
  86. data/test/tc_ruby_country_info.rb +0 -110
  87. data/test/tc_ruby_data_source.rb +0 -165
  88. data/test/tc_time_or_datetime.rb +0 -660
  89. data/test/tc_timezone.rb +0 -1359
  90. data/test/tc_timezone_definition.rb +0 -113
  91. data/test/tc_timezone_index_definition.rb +0 -73
  92. data/test/tc_timezone_info.rb +0 -11
  93. data/test/tc_timezone_london.rb +0 -143
  94. data/test/tc_timezone_melbourne.rb +0 -142
  95. data/test/tc_timezone_new_york.rb +0 -142
  96. data/test/tc_timezone_offset.rb +0 -126
  97. data/test/tc_timezone_period.rb +0 -555
  98. data/test/tc_timezone_proxy.rb +0 -136
  99. data/test/tc_timezone_transition.rb +0 -366
  100. data/test/tc_timezone_transition_definition.rb +0 -295
  101. data/test/tc_timezone_utc.rb +0 -27
  102. data/test/tc_transition_data_timezone_info.rb +0 -433
  103. data/test/tc_zoneinfo_country_info.rb +0 -78
  104. data/test/tc_zoneinfo_data_source.rb +0 -1204
  105. data/test/tc_zoneinfo_timezone_info.rb +0 -1234
  106. data/test/test_utils.rb +0 -188
  107. data/test/ts_all.rb +0 -7
  108. data/test/ts_all_ruby.rb +0 -5
  109. data/test/ts_all_zoneinfo.rb +0 -9
  110. data/test/tzinfo-data/tzinfo/data.rb +0 -8
  111. data/test/tzinfo-data/tzinfo/data/definitions/America/Argentina/Buenos_Aires.rb +0 -89
  112. data/test/tzinfo-data/tzinfo/data/definitions/America/New_York.rb +0 -315
  113. data/test/tzinfo-data/tzinfo/data/definitions/Australia/Melbourne.rb +0 -218
  114. data/test/tzinfo-data/tzinfo/data/definitions/EST.rb +0 -19
  115. data/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__m__1.rb +0 -21
  116. data/test/tzinfo-data/tzinfo/data/definitions/Etc/GMT__p__1.rb +0 -21
  117. data/test/tzinfo-data/tzinfo/data/definitions/Etc/UTC.rb +0 -21
  118. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Amsterdam.rb +0 -261
  119. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Andorra.rb +0 -186
  120. data/test/tzinfo-data/tzinfo/data/definitions/Europe/London.rb +0 -321
  121. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Paris.rb +0 -265
  122. data/test/tzinfo-data/tzinfo/data/definitions/Europe/Prague.rb +0 -220
  123. data/test/tzinfo-data/tzinfo/data/definitions/UTC.rb +0 -16
  124. data/test/tzinfo-data/tzinfo/data/indexes/countries.rb +0 -927
  125. data/test/tzinfo-data/tzinfo/data/indexes/timezones.rb +0 -596
  126. data/test/tzinfo-data/tzinfo/data/version.rb +0 -14
  127. data/test/zoneinfo/America/Argentina/Buenos_Aires +0 -0
  128. data/test/zoneinfo/America/New_York +0 -0
  129. data/test/zoneinfo/Australia/Melbourne +0 -0
  130. data/test/zoneinfo/EST +0 -0
  131. data/test/zoneinfo/Etc/UTC +0 -0
  132. data/test/zoneinfo/Europe/Amsterdam +0 -0
  133. data/test/zoneinfo/Europe/Andorra +0 -0
  134. data/test/zoneinfo/Europe/London +0 -0
  135. data/test/zoneinfo/Europe/Paris +0 -0
  136. data/test/zoneinfo/Europe/Prague +0 -0
  137. data/test/zoneinfo/Factory +0 -0
  138. data/test/zoneinfo/iso3166.tab +0 -275
  139. data/test/zoneinfo/leapseconds +0 -61
  140. data/test/zoneinfo/posix/Europe/London +0 -0
  141. data/test/zoneinfo/posixrules +0 -0
  142. data/test/zoneinfo/right/Europe/London +0 -0
  143. data/test/zoneinfo/zone.tab +0 -439
  144. data/test/zoneinfo/zone1970.tab +0 -369
  145. data/tzinfo.gemspec +0 -21
@@ -1,188 +0,0 @@
1
- tests_dir = File.expand_path(File.dirname(__FILE__))
2
- tests_dir.untaint if RUBY_VERSION < '2.7'
3
- TESTS_DIR = tests_dir
4
- TZINFO_LIB_DIR = File.expand_path(File.join(TESTS_DIR, '..', 'lib'))
5
- TZINFO_TEST_DATA_DIR = File.join(TESTS_DIR, 'tzinfo-data')
6
- TZINFO_TEST_ZONEINFO_DIR = File.join(TESTS_DIR, 'zoneinfo')
7
-
8
- $:.unshift(TZINFO_LIB_DIR) unless $:.include?(TZINFO_LIB_DIR)
9
-
10
- # tzinfo-data contains a cut down copy of tzinfo-data for use in the tests.
11
- # Add it to the load path.
12
- $:.unshift(TZINFO_TEST_DATA_DIR) unless $:.include?(TZINFO_TEST_DATA_DIR)
13
-
14
- require 'minitest/autorun'
15
- require 'tzinfo'
16
- require 'fileutils'
17
- require 'rbconfig'
18
-
19
- module TestUtils
20
- ZONEINFO_SYMLINKS = [
21
- ['localtime', 'America/New_York'],
22
- ['UTC', 'Etc/UTC']]
23
-
24
-
25
- def self.prepare_test_zoneinfo_dir
26
- ZONEINFO_SYMLINKS.each do |file, target|
27
- path = File.join(TZINFO_TEST_ZONEINFO_DIR, file)
28
-
29
- File.delete(path) if File.exist?(path)
30
-
31
- begin
32
- FileUtils.ln_s(target, path)
33
- rescue NotImplementedError, Errno::EACCES
34
- # Symlinks not supported on this platform, or permission denied
35
- # (administrative rights are required on Windows). Copy instead.
36
- target_path = File.join(TZINFO_TEST_ZONEINFO_DIR, target)
37
- FileUtils.cp(target_path, path)
38
- end
39
- end
40
- end
41
- end
42
-
43
- TestUtils.prepare_test_zoneinfo_dir
44
-
45
-
46
-
47
- module Kernel
48
- # Suppresses any warnings raised in a specified block.
49
- def without_warnings
50
- old_verbose = $VERBOSE
51
- begin
52
- $VERBOSE = nil
53
- yield
54
- ensure
55
- $-v = old_verbose
56
- end
57
- end
58
-
59
- def safe_test(options = {})
60
- # Ruby >= 2.7, JRuby and Rubinus don't support SAFE levels.
61
- available = RUBY_VERSION < '2.7' && !(defined?(RUBY_ENGINE) && %w(jruby rbx).include?(RUBY_ENGINE))
62
-
63
- if available || options[:unavailable] != :skip
64
- thread = Thread.new do
65
- orig_diff = Minitest::Assertions.diff
66
-
67
- if available
68
- orig_safe = $SAFE
69
- $SAFE = options[:level] || 1
70
- end
71
- begin
72
- # Disable the use of external diff tools during safe mode tests (since
73
- # safe mode will prevent their use). The initial value is retrieved
74
- # before activating safe mode because the first time
75
- # Minitest::Assertions.diff is called, it will attempt to find a diff
76
- # tool. Finding the diff tool will also fail in safe mode.
77
- Minitest::Assertions.diff = nil
78
- begin
79
- yield
80
- ensure
81
- Minitest::Assertions.diff = orig_diff
82
- end
83
- ensure
84
- if available
85
- # On Ruby < 2.6, setting $SAFE affects only the current thread
86
- # and the $SAFE level cannot be downgraded. Catch and ignore the
87
- # SecurityError.
88
- # On Ruby >= 2.6, setting $SAFE is global, and the $SAFE level
89
- # can be downgraded. Restore $SAFE back to the original level.
90
- begin
91
- $SAFE = orig_safe
92
- rescue SecurityError
93
- end
94
- end
95
- end
96
- end
97
-
98
- thread.join
99
- end
100
- end
101
-
102
- def skip_if_has_bug_14060
103
- # On Ruby 2.4.4 in safe mode, require will fail with a SecurityError for
104
- # any file that has not previously been loaded, regardless of whether the
105
- # file name is tainted.
106
- # See https://bugs.ruby-lang.org/issues/14060#note-5.
107
- if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby' && RUBY_VERSION == '2.4.4'
108
- skip('Skipping test due to Ruby 2.4.4 being affected by Bug 14060 (see https://bugs.ruby-lang.org/issues/14060#note-5)')
109
- end
110
- end
111
-
112
- def assert_array_same_items(expected, actual, msg = nil)
113
- full_message = message(msg, '') { diff(expected, actual) }
114
- condition = (expected.size == actual.size) && (expected - actual == [])
115
- assert(condition, full_message)
116
- end
117
-
118
- def assert_sub_process_returns(expected_lines, code, extra_load_path = [], required = ['tzinfo'])
119
- ruby = File.join(RbConfig::CONFIG['bindir'],
120
- RbConfig::CONFIG['ruby_install_name'] + RbConfig::CONFIG['EXEEXT'])
121
-
122
- load_path = [TZINFO_LIB_DIR] + extra_load_path
123
-
124
- # If RubyGems is loaded in the current process, then require it in the
125
- # sub-process, as it may be needed in order to require dependencies.
126
- if defined?(Gem) && Gem.instance_of?(Module)
127
- required = ['rubygems'] + required
128
- end
129
-
130
- if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
131
- # Stop Rubinus from operating as irb.
132
- args = ' -'
133
- else
134
- args = ''
135
- end
136
-
137
- IO.popen("\"#{ruby}\"#{args}", 'r+') do |process|
138
- load_path.each do |p|
139
- process.puts("$:.unshift('#{p.gsub("'", "\\\\'")}')")
140
- end
141
-
142
- required.each do |r|
143
- process.puts("require '#{r.gsub("'", "\\\\'")}'")
144
- end
145
-
146
- process.puts(code)
147
- process.flush
148
- process.close_write
149
-
150
- actual_lines = process.readlines
151
- actual_lines = actual_lines.collect {|l| l.chomp}
152
- assert_equal(expected_lines, actual_lines)
153
- end
154
- end
155
-
156
- def assert_nothing_raised(msg = nil)
157
- begin
158
- yield
159
- rescue => e
160
- full_message = message(msg) { exception_details(e, 'Exception raised: ') }
161
- assert(false, full_message)
162
- end
163
- end
164
- end
165
-
166
-
167
- # Object#taint is a deprecated no-op in Ruby 2.7 and outputs a warning. It will
168
- # be removed in 3.0. Silence the warning or supply a replacement.
169
- if TZInfo::RubyCoreSupport.const_defined?(:UntaintExt)
170
- module TaintExt
171
- refine Object do
172
- def taint
173
- self
174
- end
175
- end
176
- end
177
- end
178
-
179
-
180
- # JRuby 1.7.5 to 1.7.9 consider DateTime instances that differ by less than
181
- # 1 millisecond to be equivalent (https://github.com/jruby/jruby/issues/1311).
182
- #
183
- # A few test cases compare at a resolution of 1 microsecond, so this causes
184
- # failures on JRuby 1.7.5 to 1.7.9.
185
- #
186
- # Determine what the platform supports and adjust the tests accordingly.
187
- DATETIME_RESOLUTION = (0..5).collect {|i| 10**i}.find {|i| (DateTime.new(2013,1,1,0,0,0) <=> DateTime.new(2013,1,1,0,0,Rational(i,1000000))) < 0}
188
- raise 'Unable to compare DateTimes at a resolution less than one second on this platform' unless DATETIME_RESOLUTION
@@ -1,7 +0,0 @@
1
- # Force a particular timezone to be local (helps find issues when local
2
- # timezone isn't GMT). This won't work on Windows.
3
- ENV['TZ'] = 'America/Los_Angeles'
4
-
5
- Dir[File.join(File.expand_path(File.dirname(__FILE__)), 'tc_*.rb')].each {|t| require t}
6
-
7
- puts "Using #{DataSource.get}"
@@ -1,5 +0,0 @@
1
- require File.join(File.expand_path(File.dirname(__FILE__)), 'test_utils.rb')
2
-
3
- TZInfo::DataSource.set(:ruby)
4
-
5
- require File.join(File.expand_path(File.dirname(__FILE__)), 'ts_all.rb')
@@ -1,9 +0,0 @@
1
- require File.join(File.expand_path(File.dirname(__FILE__)), 'test_utils.rb')
2
-
3
- # Use a zoneinfo directory containing files needed by the tests.
4
- # The symlinks in this directory are set up in test_utils.rb.
5
- zoneinfo_path = File.join(File.expand_path(File.dirname(__FILE__)), 'zoneinfo')
6
- zoneinfo_path.untaint if RUBY_VERSION < '2.7'
7
- TZInfo::DataSource.set(:zoneinfo, zoneinfo_path)
8
-
9
- require File.join(File.expand_path(File.dirname(__FILE__)), 'ts_all.rb')
@@ -1,8 +0,0 @@
1
- # Top level module for TZInfo.
2
- module TZInfo
3
- # Top level module for TZInfo::Data.
4
- module Data
5
- end
6
- end
7
-
8
- require 'tzinfo/data/version'
@@ -1,89 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- # This file contains data derived from the IANA Time Zone Database
4
- # (http://www.iana.org/time-zones).
5
-
6
- module TZInfo
7
- module Data
8
- module Definitions
9
- module America
10
- module Argentina
11
- module Buenos_Aires
12
- include TimezoneDefinition
13
-
14
- timezone 'America/Argentina/Buenos_Aires' do |tz|
15
- tz.offset :o0, -14028, 0, :LMT
16
- tz.offset :o1, -15408, 0, :CMT
17
- tz.offset :o2, -14400, 0, :ART
18
- tz.offset :o3, -14400, 3600, :ARST
19
- tz.offset :o4, -10800, 0, :ART
20
- tz.offset :o5, -10800, 3600, :ARST
21
-
22
- tz.transition 1894, 10, :o1, -2372097972, 17374555169, 7200
23
- tz.transition 1920, 5, :o2, -1567453392, 1453467407, 600
24
- tz.transition 1930, 12, :o3, -1233432000, 7278935, 3
25
- tz.transition 1931, 4, :o2, -1222981200, 19411461, 8
26
- tz.transition 1931, 10, :o3, -1205956800, 7279889, 3
27
- tz.transition 1932, 3, :o2, -1194037200, 19414141, 8
28
- tz.transition 1932, 11, :o3, -1172865600, 7281038, 3
29
- tz.transition 1933, 3, :o2, -1162501200, 19417061, 8
30
- tz.transition 1933, 11, :o3, -1141329600, 7282133, 3
31
- tz.transition 1934, 3, :o2, -1130965200, 19419981, 8
32
- tz.transition 1934, 11, :o3, -1109793600, 7283228, 3
33
- tz.transition 1935, 3, :o2, -1099429200, 19422901, 8
34
- tz.transition 1935, 11, :o3, -1078257600, 7284323, 3
35
- tz.transition 1936, 3, :o2, -1067806800, 19425829, 8
36
- tz.transition 1936, 11, :o3, -1046635200, 7285421, 3
37
- tz.transition 1937, 3, :o2, -1036270800, 19428749, 8
38
- tz.transition 1937, 11, :o3, -1015099200, 7286516, 3
39
- tz.transition 1938, 3, :o2, -1004734800, 19431669, 8
40
- tz.transition 1938, 11, :o3, -983563200, 7287611, 3
41
- tz.transition 1939, 3, :o2, -973198800, 19434589, 8
42
- tz.transition 1939, 11, :o3, -952027200, 7288706, 3
43
- tz.transition 1940, 3, :o2, -941576400, 19437517, 8
44
- tz.transition 1940, 7, :o3, -931032000, 7289435, 3
45
- tz.transition 1941, 6, :o2, -900882000, 19441285, 8
46
- tz.transition 1941, 10, :o3, -890337600, 7290848, 3
47
- tz.transition 1943, 8, :o2, -833749200, 19447501, 8
48
- tz.transition 1943, 10, :o3, -827265600, 7293038, 3
49
- tz.transition 1946, 3, :o2, -752274000, 19455045, 8
50
- tz.transition 1946, 10, :o3, -733780800, 7296284, 3
51
- tz.transition 1963, 10, :o2, -197326800, 19506429, 8
52
- tz.transition 1963, 12, :o3, -190843200, 7315136, 3
53
- tz.transition 1964, 3, :o2, -184194000, 19507645, 8
54
- tz.transition 1964, 10, :o3, -164491200, 7316051, 3
55
- tz.transition 1965, 3, :o2, -152658000, 19510565, 8
56
- tz.transition 1965, 10, :o3, -132955200, 7317146, 3
57
- tz.transition 1966, 3, :o2, -121122000, 19513485, 8
58
- tz.transition 1966, 10, :o3, -101419200, 7318241, 3
59
- tz.transition 1967, 4, :o2, -86821200, 19516661, 8
60
- tz.transition 1967, 10, :o3, -71092800, 7319294, 3
61
- tz.transition 1968, 4, :o2, -54766800, 19519629, 8
62
- tz.transition 1968, 10, :o3, -39038400, 7320407, 3
63
- tz.transition 1969, 4, :o2, -23317200, 19522541, 8
64
- tz.transition 1969, 10, :o4, -7588800, 7321499, 3
65
- tz.transition 1974, 1, :o5, 128142000
66
- tz.transition 1974, 5, :o4, 136605600
67
- tz.transition 1988, 12, :o5, 596948400
68
- tz.transition 1989, 3, :o4, 605066400
69
- tz.transition 1989, 10, :o5, 624423600
70
- tz.transition 1990, 3, :o4, 636516000
71
- tz.transition 1990, 10, :o5, 656478000
72
- tz.transition 1991, 3, :o4, 667965600
73
- tz.transition 1991, 10, :o5, 687927600
74
- tz.transition 1992, 3, :o4, 699415200
75
- tz.transition 1992, 10, :o5, 719377200
76
- tz.transition 1993, 3, :o4, 731469600
77
- tz.transition 1999, 10, :o3, 938919600
78
- tz.transition 2000, 3, :o4, 952052400
79
- tz.transition 2007, 12, :o5, 1198983600
80
- tz.transition 2008, 3, :o4, 1205632800
81
- tz.transition 2008, 10, :o5, 1224385200
82
- tz.transition 2009, 3, :o4, 1237082400
83
- end
84
- end
85
- end
86
- end
87
- end
88
- end
89
- end
@@ -1,315 +0,0 @@
1
- # encoding: UTF-8
2
-
3
- # This file contains data derived from the IANA Time Zone Database
4
- # (http://www.iana.org/time-zones).
5
-
6
- module TZInfo
7
- module Data
8
- module Definitions
9
- module America
10
- module New_York
11
- include TimezoneDefinition
12
-
13
- timezone 'America/New_York' do |tz|
14
- tz.offset :o0, -17762, 0, :LMT
15
- tz.offset :o1, -18000, 0, :EST
16
- tz.offset :o2, -18000, 3600, :EDT
17
- tz.offset :o3, -18000, 3600, :EWT
18
- tz.offset :o4, -18000, 3600, :EPT
19
-
20
- tz.transition 1883, 11, :o1, -2717650800, 57819197, 24
21
- tz.transition 1918, 3, :o2, -1633280400, 58120411, 24
22
- tz.transition 1918, 10, :o1, -1615140000, 9687575, 4
23
- tz.transition 1919, 3, :o2, -1601830800, 58129147, 24
24
- tz.transition 1919, 10, :o1, -1583690400, 9689031, 4
25
- tz.transition 1920, 3, :o2, -1570381200, 58137883, 24
26
- tz.transition 1920, 10, :o1, -1551636000, 9690515, 4
27
- tz.transition 1921, 4, :o2, -1536512400, 58147291, 24
28
- tz.transition 1921, 9, :o1, -1523210400, 9691831, 4
29
- tz.transition 1922, 4, :o2, -1504458000, 58156195, 24
30
- tz.transition 1922, 9, :o1, -1491760800, 9693287, 4
31
- tz.transition 1923, 4, :o2, -1473008400, 58164931, 24
32
- tz.transition 1923, 9, :o1, -1459706400, 9694771, 4
33
- tz.transition 1924, 4, :o2, -1441558800, 58173667, 24
34
- tz.transition 1924, 9, :o1, -1428256800, 9696227, 4
35
- tz.transition 1925, 4, :o2, -1410109200, 58182403, 24
36
- tz.transition 1925, 9, :o1, -1396807200, 9697683, 4
37
- tz.transition 1926, 4, :o2, -1378659600, 58191139, 24
38
- tz.transition 1926, 9, :o1, -1365357600, 9699139, 4
39
- tz.transition 1927, 4, :o2, -1347210000, 58199875, 24
40
- tz.transition 1927, 9, :o1, -1333908000, 9700595, 4
41
- tz.transition 1928, 4, :o2, -1315155600, 58208779, 24
42
- tz.transition 1928, 9, :o1, -1301853600, 9702079, 4
43
- tz.transition 1929, 4, :o2, -1283706000, 58217515, 24
44
- tz.transition 1929, 9, :o1, -1270404000, 9703535, 4
45
- tz.transition 1930, 4, :o2, -1252256400, 58226251, 24
46
- tz.transition 1930, 9, :o1, -1238954400, 9704991, 4
47
- tz.transition 1931, 4, :o2, -1220806800, 58234987, 24
48
- tz.transition 1931, 9, :o1, -1207504800, 9706447, 4
49
- tz.transition 1932, 4, :o2, -1189357200, 58243723, 24
50
- tz.transition 1932, 9, :o1, -1176055200, 9707903, 4
51
- tz.transition 1933, 4, :o2, -1157302800, 58252627, 24
52
- tz.transition 1933, 9, :o1, -1144605600, 9709359, 4
53
- tz.transition 1934, 4, :o2, -1125853200, 58261363, 24
54
- tz.transition 1934, 9, :o1, -1112551200, 9710843, 4
55
- tz.transition 1935, 4, :o2, -1094403600, 58270099, 24
56
- tz.transition 1935, 9, :o1, -1081101600, 9712299, 4
57
- tz.transition 1936, 4, :o2, -1062954000, 58278835, 24
58
- tz.transition 1936, 9, :o1, -1049652000, 9713755, 4
59
- tz.transition 1937, 4, :o2, -1031504400, 58287571, 24
60
- tz.transition 1937, 9, :o1, -1018202400, 9715211, 4
61
- tz.transition 1938, 4, :o2, -1000054800, 58296307, 24
62
- tz.transition 1938, 9, :o1, -986752800, 9716667, 4
63
- tz.transition 1939, 4, :o2, -968000400, 58305211, 24
64
- tz.transition 1939, 9, :o1, -955303200, 9718123, 4
65
- tz.transition 1940, 4, :o2, -936550800, 58313947, 24
66
- tz.transition 1940, 9, :o1, -923248800, 9719607, 4
67
- tz.transition 1941, 4, :o2, -905101200, 58322683, 24
68
- tz.transition 1941, 9, :o1, -891799200, 9721063, 4
69
- tz.transition 1942, 2, :o3, -880218000, 58329595, 24
70
- tz.transition 1945, 8, :o4, -769395600, 58360379, 24
71
- tz.transition 1945, 9, :o1, -765396000, 9726915, 4
72
- tz.transition 1946, 4, :o2, -747248400, 58366531, 24
73
- tz.transition 1946, 9, :o1, -733946400, 9728371, 4
74
- tz.transition 1947, 4, :o2, -715798800, 58375267, 24
75
- tz.transition 1947, 9, :o1, -702496800, 9729827, 4
76
- tz.transition 1948, 4, :o2, -684349200, 58384003, 24
77
- tz.transition 1948, 9, :o1, -671047200, 9731283, 4
78
- tz.transition 1949, 4, :o2, -652899600, 58392739, 24
79
- tz.transition 1949, 9, :o1, -639597600, 9732739, 4
80
- tz.transition 1950, 4, :o2, -620845200, 58401643, 24
81
- tz.transition 1950, 9, :o1, -608148000, 9734195, 4
82
- tz.transition 1951, 4, :o2, -589395600, 58410379, 24
83
- tz.transition 1951, 9, :o1, -576093600, 9735679, 4
84
- tz.transition 1952, 4, :o2, -557946000, 58419115, 24
85
- tz.transition 1952, 9, :o1, -544644000, 9737135, 4
86
- tz.transition 1953, 4, :o2, -526496400, 58427851, 24
87
- tz.transition 1953, 9, :o1, -513194400, 9738591, 4
88
- tz.transition 1954, 4, :o2, -495046800, 58436587, 24
89
- tz.transition 1954, 9, :o1, -481744800, 9740047, 4
90
- tz.transition 1955, 4, :o2, -463597200, 58445323, 24
91
- tz.transition 1955, 10, :o1, -447271200, 9741643, 4
92
- tz.transition 1956, 4, :o2, -431542800, 58454227, 24
93
- tz.transition 1956, 10, :o1, -415821600, 9743099, 4
94
- tz.transition 1957, 4, :o2, -400093200, 58462963, 24
95
- tz.transition 1957, 10, :o1, -384372000, 9744555, 4
96
- tz.transition 1958, 4, :o2, -368643600, 58471699, 24
97
- tz.transition 1958, 10, :o1, -352922400, 9746011, 4
98
- tz.transition 1959, 4, :o2, -337194000, 58480435, 24
99
- tz.transition 1959, 10, :o1, -321472800, 9747467, 4
100
- tz.transition 1960, 4, :o2, -305744400, 58489171, 24
101
- tz.transition 1960, 10, :o1, -289418400, 9748951, 4
102
- tz.transition 1961, 4, :o2, -273690000, 58498075, 24
103
- tz.transition 1961, 10, :o1, -257968800, 9750407, 4
104
- tz.transition 1962, 4, :o2, -242240400, 58506811, 24
105
- tz.transition 1962, 10, :o1, -226519200, 9751863, 4
106
- tz.transition 1963, 4, :o2, -210790800, 58515547, 24
107
- tz.transition 1963, 10, :o1, -195069600, 9753319, 4
108
- tz.transition 1964, 4, :o2, -179341200, 58524283, 24
109
- tz.transition 1964, 10, :o1, -163620000, 9754775, 4
110
- tz.transition 1965, 4, :o2, -147891600, 58533019, 24
111
- tz.transition 1965, 10, :o1, -131565600, 9756259, 4
112
- tz.transition 1966, 4, :o2, -116442000, 58541755, 24
113
- tz.transition 1966, 10, :o1, -100116000, 9757715, 4
114
- tz.transition 1967, 4, :o2, -84387600, 58550659, 24
115
- tz.transition 1967, 10, :o1, -68666400, 9759171, 4
116
- tz.transition 1968, 4, :o2, -52938000, 58559395, 24
117
- tz.transition 1968, 10, :o1, -37216800, 9760627, 4
118
- tz.transition 1969, 4, :o2, -21488400, 58568131, 24
119
- tz.transition 1969, 10, :o1, -5767200, 9762083, 4
120
- tz.transition 1970, 4, :o2, 9961200
121
- tz.transition 1970, 10, :o1, 25682400
122
- tz.transition 1971, 4, :o2, 41410800
123
- tz.transition 1971, 10, :o1, 57736800
124
- tz.transition 1972, 4, :o2, 73465200
125
- tz.transition 1972, 10, :o1, 89186400
126
- tz.transition 1973, 4, :o2, 104914800
127
- tz.transition 1973, 10, :o1, 120636000
128
- tz.transition 1974, 1, :o2, 126687600
129
- tz.transition 1974, 10, :o1, 152085600
130
- tz.transition 1975, 2, :o2, 162370800
131
- tz.transition 1975, 10, :o1, 183535200
132
- tz.transition 1976, 4, :o2, 199263600
133
- tz.transition 1976, 10, :o1, 215589600
134
- tz.transition 1977, 4, :o2, 230713200
135
- tz.transition 1977, 10, :o1, 247039200
136
- tz.transition 1978, 4, :o2, 262767600
137
- tz.transition 1978, 10, :o1, 278488800
138
- tz.transition 1979, 4, :o2, 294217200
139
- tz.transition 1979, 10, :o1, 309938400
140
- tz.transition 1980, 4, :o2, 325666800
141
- tz.transition 1980, 10, :o1, 341388000
142
- tz.transition 1981, 4, :o2, 357116400
143
- tz.transition 1981, 10, :o1, 372837600
144
- tz.transition 1982, 4, :o2, 388566000
145
- tz.transition 1982, 10, :o1, 404892000
146
- tz.transition 1983, 4, :o2, 420015600
147
- tz.transition 1983, 10, :o1, 436341600
148
- tz.transition 1984, 4, :o2, 452070000
149
- tz.transition 1984, 10, :o1, 467791200
150
- tz.transition 1985, 4, :o2, 483519600
151
- tz.transition 1985, 10, :o1, 499240800
152
- tz.transition 1986, 4, :o2, 514969200
153
- tz.transition 1986, 10, :o1, 530690400
154
- tz.transition 1987, 4, :o2, 544604400
155
- tz.transition 1987, 10, :o1, 562140000
156
- tz.transition 1988, 4, :o2, 576054000
157
- tz.transition 1988, 10, :o1, 594194400
158
- tz.transition 1989, 4, :o2, 607503600
159
- tz.transition 1989, 10, :o1, 625644000
160
- tz.transition 1990, 4, :o2, 638953200
161
- tz.transition 1990, 10, :o1, 657093600
162
- tz.transition 1991, 4, :o2, 671007600
163
- tz.transition 1991, 10, :o1, 688543200
164
- tz.transition 1992, 4, :o2, 702457200
165
- tz.transition 1992, 10, :o1, 719992800
166
- tz.transition 1993, 4, :o2, 733906800
167
- tz.transition 1993, 10, :o1, 752047200
168
- tz.transition 1994, 4, :o2, 765356400
169
- tz.transition 1994, 10, :o1, 783496800
170
- tz.transition 1995, 4, :o2, 796806000
171
- tz.transition 1995, 10, :o1, 814946400
172
- tz.transition 1996, 4, :o2, 828860400
173
- tz.transition 1996, 10, :o1, 846396000
174
- tz.transition 1997, 4, :o2, 860310000
175
- tz.transition 1997, 10, :o1, 877845600
176
- tz.transition 1998, 4, :o2, 891759600
177
- tz.transition 1998, 10, :o1, 909295200
178
- tz.transition 1999, 4, :o2, 923209200
179
- tz.transition 1999, 10, :o1, 941349600
180
- tz.transition 2000, 4, :o2, 954658800
181
- tz.transition 2000, 10, :o1, 972799200
182
- tz.transition 2001, 4, :o2, 986108400
183
- tz.transition 2001, 10, :o1, 1004248800
184
- tz.transition 2002, 4, :o2, 1018162800
185
- tz.transition 2002, 10, :o1, 1035698400
186
- tz.transition 2003, 4, :o2, 1049612400
187
- tz.transition 2003, 10, :o1, 1067148000
188
- tz.transition 2004, 4, :o2, 1081062000
189
- tz.transition 2004, 10, :o1, 1099202400
190
- tz.transition 2005, 4, :o2, 1112511600
191
- tz.transition 2005, 10, :o1, 1130652000
192
- tz.transition 2006, 4, :o2, 1143961200
193
- tz.transition 2006, 10, :o1, 1162101600
194
- tz.transition 2007, 3, :o2, 1173596400
195
- tz.transition 2007, 11, :o1, 1194156000
196
- tz.transition 2008, 3, :o2, 1205046000
197
- tz.transition 2008, 11, :o1, 1225605600
198
- tz.transition 2009, 3, :o2, 1236495600
199
- tz.transition 2009, 11, :o1, 1257055200
200
- tz.transition 2010, 3, :o2, 1268550000
201
- tz.transition 2010, 11, :o1, 1289109600
202
- tz.transition 2011, 3, :o2, 1299999600
203
- tz.transition 2011, 11, :o1, 1320559200
204
- tz.transition 2012, 3, :o2, 1331449200
205
- tz.transition 2012, 11, :o1, 1352008800
206
- tz.transition 2013, 3, :o2, 1362898800
207
- tz.transition 2013, 11, :o1, 1383458400
208
- tz.transition 2014, 3, :o2, 1394348400
209
- tz.transition 2014, 11, :o1, 1414908000
210
- tz.transition 2015, 3, :o2, 1425798000
211
- tz.transition 2015, 11, :o1, 1446357600
212
- tz.transition 2016, 3, :o2, 1457852400
213
- tz.transition 2016, 11, :o1, 1478412000
214
- tz.transition 2017, 3, :o2, 1489302000
215
- tz.transition 2017, 11, :o1, 1509861600
216
- tz.transition 2018, 3, :o2, 1520751600
217
- tz.transition 2018, 11, :o1, 1541311200
218
- tz.transition 2019, 3, :o2, 1552201200
219
- tz.transition 2019, 11, :o1, 1572760800
220
- tz.transition 2020, 3, :o2, 1583650800
221
- tz.transition 2020, 11, :o1, 1604210400
222
- tz.transition 2021, 3, :o2, 1615705200
223
- tz.transition 2021, 11, :o1, 1636264800
224
- tz.transition 2022, 3, :o2, 1647154800
225
- tz.transition 2022, 11, :o1, 1667714400
226
- tz.transition 2023, 3, :o2, 1678604400
227
- tz.transition 2023, 11, :o1, 1699164000
228
- tz.transition 2024, 3, :o2, 1710054000
229
- tz.transition 2024, 11, :o1, 1730613600
230
- tz.transition 2025, 3, :o2, 1741503600
231
- tz.transition 2025, 11, :o1, 1762063200
232
- tz.transition 2026, 3, :o2, 1772953200
233
- tz.transition 2026, 11, :o1, 1793512800
234
- tz.transition 2027, 3, :o2, 1805007600
235
- tz.transition 2027, 11, :o1, 1825567200
236
- tz.transition 2028, 3, :o2, 1836457200
237
- tz.transition 2028, 11, :o1, 1857016800
238
- tz.transition 2029, 3, :o2, 1867906800
239
- tz.transition 2029, 11, :o1, 1888466400
240
- tz.transition 2030, 3, :o2, 1899356400
241
- tz.transition 2030, 11, :o1, 1919916000
242
- tz.transition 2031, 3, :o2, 1930806000
243
- tz.transition 2031, 11, :o1, 1951365600
244
- tz.transition 2032, 3, :o2, 1962860400
245
- tz.transition 2032, 11, :o1, 1983420000
246
- tz.transition 2033, 3, :o2, 1994310000
247
- tz.transition 2033, 11, :o1, 2014869600
248
- tz.transition 2034, 3, :o2, 2025759600
249
- tz.transition 2034, 11, :o1, 2046319200
250
- tz.transition 2035, 3, :o2, 2057209200
251
- tz.transition 2035, 11, :o1, 2077768800
252
- tz.transition 2036, 3, :o2, 2088658800
253
- tz.transition 2036, 11, :o1, 2109218400
254
- tz.transition 2037, 3, :o2, 2120108400
255
- tz.transition 2037, 11, :o1, 2140668000
256
- tz.transition 2038, 3, :o2, 2152162800, 59171923, 24
257
- tz.transition 2038, 11, :o1, 2172722400, 9862939, 4
258
- tz.transition 2039, 3, :o2, 2183612400, 59180659, 24
259
- tz.transition 2039, 11, :o1, 2204172000, 9864395, 4
260
- tz.transition 2040, 3, :o2, 2215062000, 59189395, 24
261
- tz.transition 2040, 11, :o1, 2235621600, 9865851, 4
262
- tz.transition 2041, 3, :o2, 2246511600, 59198131, 24
263
- tz.transition 2041, 11, :o1, 2267071200, 9867307, 4
264
- tz.transition 2042, 3, :o2, 2277961200, 59206867, 24
265
- tz.transition 2042, 11, :o1, 2298520800, 9868763, 4
266
- tz.transition 2043, 3, :o2, 2309410800, 59215603, 24
267
- tz.transition 2043, 11, :o1, 2329970400, 9870219, 4
268
- tz.transition 2044, 3, :o2, 2341465200, 59224507, 24
269
- tz.transition 2044, 11, :o1, 2362024800, 9871703, 4
270
- tz.transition 2045, 3, :o2, 2372914800, 59233243, 24
271
- tz.transition 2045, 11, :o1, 2393474400, 9873159, 4
272
- tz.transition 2046, 3, :o2, 2404364400, 59241979, 24
273
- tz.transition 2046, 11, :o1, 2424924000, 9874615, 4
274
- tz.transition 2047, 3, :o2, 2435814000, 59250715, 24
275
- tz.transition 2047, 11, :o1, 2456373600, 9876071, 4
276
- tz.transition 2048, 3, :o2, 2467263600, 59259451, 24
277
- tz.transition 2048, 11, :o1, 2487823200, 9877527, 4
278
- tz.transition 2049, 3, :o2, 2499318000, 59268355, 24
279
- tz.transition 2049, 11, :o1, 2519877600, 9879011, 4
280
- tz.transition 2050, 3, :o2, 2530767600, 59277091, 24
281
- tz.transition 2050, 11, :o1, 2551327200, 9880467, 4
282
- tz.transition 2051, 3, :o2, 2562217200, 59285827, 24
283
- tz.transition 2051, 11, :o1, 2582776800, 9881923, 4
284
- tz.transition 2052, 3, :o2, 2593666800, 59294563, 24
285
- tz.transition 2052, 11, :o1, 2614226400, 9883379, 4
286
- tz.transition 2053, 3, :o2, 2625116400, 59303299, 24
287
- tz.transition 2053, 11, :o1, 2645676000, 9884835, 4
288
- tz.transition 2054, 3, :o2, 2656566000, 59312035, 24
289
- tz.transition 2054, 11, :o1, 2677125600, 9886291, 4
290
- tz.transition 2055, 3, :o2, 2688620400, 59320939, 24
291
- tz.transition 2055, 11, :o1, 2709180000, 9887775, 4
292
- tz.transition 2056, 3, :o2, 2720070000, 59329675, 24
293
- tz.transition 2056, 11, :o1, 2740629600, 9889231, 4
294
- tz.transition 2057, 3, :o2, 2751519600, 59338411, 24
295
- tz.transition 2057, 11, :o1, 2772079200, 9890687, 4
296
- tz.transition 2058, 3, :o2, 2782969200, 59347147, 24
297
- tz.transition 2058, 11, :o1, 2803528800, 9892143, 4
298
- tz.transition 2059, 3, :o2, 2814418800, 59355883, 24
299
- tz.transition 2059, 11, :o1, 2834978400, 9893599, 4
300
- tz.transition 2060, 3, :o2, 2846473200, 59364787, 24
301
- tz.transition 2060, 11, :o1, 2867032800, 9895083, 4
302
- tz.transition 2061, 3, :o2, 2877922800, 59373523, 24
303
- tz.transition 2061, 11, :o1, 2898482400, 9896539, 4
304
- tz.transition 2062, 3, :o2, 2909372400, 59382259, 24
305
- tz.transition 2062, 11, :o1, 2929932000, 9897995, 4
306
- tz.transition 2063, 3, :o2, 2940822000, 59390995, 24
307
- tz.transition 2063, 11, :o1, 2961381600, 9899451, 4
308
- tz.transition 2064, 3, :o2, 2972271600, 59399731, 24
309
- tz.transition 2064, 11, :o1, 2992831200, 9900907, 4
310
- end
311
- end
312
- end
313
- end
314
- end
315
- end