You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the LineItemService, and I'd like to convert the startDateTime into a Ruby Time object to do some comparison. I discovered that the to_time method returns the incorrect UTC offset during daylight saving time periods.
This is because we're using the utc_offset method in TZInfo, which always returns the base offset without considering daylight saving. We could use utc_total_offset, but the way it is used, we always call it with the current time rather than the time that is being converted.
I think the correct solution is to pass the timezone object to the Time constructor rather than a utc_offset.