为什么 Ruby 返回不同年份的不同时区?

Why Ruby is returning different timezones for different years?

我的时区是 IST,+0530。 如果我传递最近几年的参数,它会显示正确的区域:

Time.new('2000', '02', '29')    # => 2000-02-29 00:00:00 +0530

但是该区域多年来一直在变化:

Time.new('1000', '01', '29')    # => 1000-01-29 00:00:00 +0553
Time.new('1943')                # => 1943-01-01 00:00:00 +0630
Time.new('1871')                # => 1871-01-01 00:00:00 +0521

为了找出以前的日期,我创建了一个循环:

puts 2_200.times.map { |i| Time.new(i.to_s) }

正如我所看到的,未来几年,该区域是 +0530,但在过去的几个世纪中,该区域有时会有所不同!

为什么同一个系统的zone不一样?

Why does the zone differ in the same system?

因为时区会随着时间而改变。