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
{{ message }}
Repository navigation
Time objects at UTC local zone should not be utc? #9436
When no time zone is specified but the local timezone is UTC, the utc? and gmt? flags for Time should return false.
UTC in this situation is considered to be a local time zone and it appears that the utc? bit is intended to indicate that a Time object has been specified as UTC directly.
This leads to several failures, discovered during #9419:
Time#_dump preserves the GMT flag
Time#_dump dumps like MRI's marshaled time format
Time.at passed Numeric returns a non-UTC Time
Time.at passed Time returns a non-UTC time if the argument is non-UTC
Time#dup returns an independent Time object
Time#gmt? returns true if time represents a time in UTC (GMT)
Time#localtime on a frozen time raises a FrozenError if the time has a different time zone
Time#- returns a non-UTC time if self is non-UTC
Time#+ returns a non-UTC time if self is non-UTC
Time#utc? returns true only if time represents a time in UTC (GMT)
I won't tag these specs, but for the FreeBSD and OpenBSD jobs from #9419 I will force TZ to be America/Chicago for now.
Activity
Force TZ to America/Chicago to avoid UTC bug