method
rfc3339
v5.2.3 -
Show latest stable
-
0 notes -
Class: ActiveSupport::TimeZone
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0
- 3.0.9
- 3.1.0
- 3.2.1
- 3.2.8
- 3.2.13
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7 (0)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (0)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
rfc3339(str)
public
Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from an RFC 3339 string.
Time.zone = 'Hawaii' # => "Hawaii" Time.zone.rfc3339('2000-01-01T00:00:00Z') # => Fri, 31 Dec 1999 14:00:00 HST -10:00
If the time or zone components are missing then an ArgumentError will be raised. This is much stricter than either parse or iso8601 which allow for missing components.
Time.zone = 'Hawaii' # => "Hawaii" Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date