Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
local_to_utc should return UTC when system time is UTC #13
Because of the way Ruby handles timezones we can find ourselves in a position where a Time object is non-utc but has a timezone of UTC. If the system timezone utc, we get the following
irb(main):013:0> Time.now.utc? => false irb(main):014:0> Time.now.zone => "UTC"
If we use such a time object in calling
In that line we check for UTC in the zone. I propose we check the
The result is that
I'm happy to submit the fix. Just wanted some feedback first.