-
Notifications
You must be signed in to change notification settings - Fork 48
Honor timezones from timeanddate.com #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hey @nobu / @jeremyevans, thanks for fixing this. Quick question, will this be back ported to currently supported versions of Ruby? What versions will it be available in? |
|
I assume it will be available in Ruby 3. Note that in all supported versions of Ruby, |
|
We run a rails app in production, and tried adding date gem before rails. Still the same incorrect timezone for CAT. # Gemfile
source 'https://rubygems.org'
ruby '2.7.1'
gem 'date', git: 'https://github.com/ruby/date', branch: 'master'
gem 'rails', '~> 6.0.0'
....2.7.1 :002 > DateTime.parse("2020-10-01 00:00:00 CAT")
=> Thu, 01 Oct 2020 00:00:00 -1000 |
|
That's a bundler issue I would guess (maybe bundler or the webserver loads date). I think to be sure the updated date library is used, checkout the date master branch, and use |
|
Tried with # Gemfile
source 'https://rubygems.org'
ruby '2.7.1'
gem 'date', git: 'https://github.com/ruby/date', branch: 'master'
gem 'rails', '~> 6.0.0'
....RUBYLIB='/Users/user/.rvm/gems/ruby-2.7.1@gemset/bundler/gems/date-f08175e34d60' bundle exec rails c
Running via Spring preloader in process 72907
Loading development environment (Rails 6.0.3.2)2.7.1 :001 > DateTime.parse('2020-10-01 00:00:00 CAT')
=> Thu, 01 Oct 2020 00:00:00 -1000Let me dig deeper, thank you for your time! |
|
|
|
I tried this out in ruby version 3.0.2 |
|
It turns out these changes aren't even in the date master branch. It looks like we missed the regeneration of zonetab.h. I'll send a pull request for that. |
|
Can we expect this to be fixed in the next ruby release? |
|
@jeremyevans In which ruby version will this be fixed? |
|
Ruby master branch has the fixed |
These zonetab IDs are imcompatible from Ruby 3.1. See: * #64 * ruby/date#25 * ruby/date#26 * ruby/date@f08175e The zonetab-based timezone parsing is "deprecated" in embulk-util-rubytime, then we do not catch up with the update of Ruby.
Fix #25