Incorrect offsets for dates beyond 2037. #70
Comments
I assume that you are using TZInfo with the zoneinfo datasource (reading system zoneinfo files rather than using the tzinfo-data gem). You can the datasource being used with Each zoneinfo file includes a list of the transitions that occur in a time zone. This list obviously cannot extend infinitely far into the future, so there is a cut-off where the transitions end. A "POSIX-TZ-environment-variable-style string" is also included in the file. This can be used to calculate the times of subsequent transitions. The zic command that generates zoneinfo files currently includes transitions up to around the year 2037. TZInfo is only able to read the list of transitions from zoneinfo files. It does not evaluate the POSIX-TZ string. When used with the zoneinfo data source, TZInfo will therefore not return any transitions beyond about 2037 (and local times beyond this point will remain at the same offset). I intend to look at supporting the POSIX-TZ string in a future version of TZInfo. For the time being though, you might like to consider installing the tzinfo-data gem as a datasource. tzinfo-data is based on the same IANA Time Zone database as the zoneinfo files and includes 50 years of future transitions. To use tzinfo-data as a datasource, just add It is also worth noting that making assumptions about local times far in the future can be dangerous. The rules concerning time zone offsets and daylight savings time can and do change. |
Referencing back to the issue in Rails, rails/rails#30408
Specifically, EDT is not included in list of time periods beyond November 2nd, 2037.
This is problematic because it causes a discrepancy in behaviour between Postgres and our Rails application, where two different dates would be produced by applying time zone offsets.
The text was updated successfully, but these errors were encountered: