Does Rails use an incorrect offset for Asia/Jerusalem's timezone?

I am using Ruby version 3.2.2 along with Rails version 7.0.7.2

Current Local Time in Jerusalem, Israel shows that Jerusalem has a UTC offset of +3 hours

Is this something that needs to be changed on active support?

1 Like

It seems that ActiveSupport::TimeZone’s utc_offset is not DST-aware.

It’s probably not a bug, because TimeZone object is not meant to give you the offset of “right now”, but rather describes the timezone in general.

If you need the offset as of right now, with DST considered, then you should check the offset of now, and not the whole zone.

ActiveSupport::TimeZone['Asia/Jerusalem'].now.utc_offset