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
Active Support time zone offset #42473
Comments
#42467 Related? |
I don't think so... it doesn't seems just a daylight savings difference there. |
Find out that ActiveSupport::Timezone.utc_offset comes form TZInfo::TimezonePeriod.utc_offset that says (2):
I'm expecting to get the current offset because I'm creating a DateTime in an specific timezone but got it wrong. It has not to be like I was expecting although I think it makes more sense to retrieve the current offset or at least document that ActiveSupport::Timezone.utc_offset retrieves the "base" offset... and maybe a new method to get the current one? Well, I don't think anymore this is a bug. (2) https://rubydoc.info/gems/tzinfo/TZInfo/TimezonePeriod#base_utc_offset-instance_method |
ActiveSupport and TZInfo utc_offset return different values. TZinfo gives the correct current offset value (EDT UTC-4h) for today.
Expected behavior
Actual behavior
System configuration
Rails version: 6.1.3.2
Ruby version: 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
The text was updated successfully, but these errors were encountered: