diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2017-03-03 22:36:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-03 22:36:57 +0000 |
commit | de17d9e23d2dd7ea4551919a56031221f10f07bd (patch) | |
tree | e32f97ab8c3355c1979a0ff7191b1fe1eb6f5afe /activesupport/lib/active_support/time_with_zone.rb | |
parent | 654afb28503568fa8354f0c0c26160897931a565 (diff) | |
parent | f0aeecda1450ba17701ccba68e5a796ce4ac4c3b (diff) | |
download | rails-de17d9e23d2dd7ea4551919a56031221f10f07bd.tar.gz rails-de17d9e23d2dd7ea4551919a56031221f10f07bd.tar.bz2 rails-de17d9e23d2dd7ea4551919a56031221f10f07bd.zip |
Merge pull request #28272 from rails/add-iso8601-and-rfc3339-parsing
Add iso8601 and rfc3339 parsing to timezones
Diffstat (limited to 'activesupport/lib/active_support/time_with_zone.rb')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 857cc1a664..e31983cf26 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -148,6 +148,7 @@ module ActiveSupport "#{time.strftime(PRECISIONS[fraction_digits.to_i])}#{formatted_offset(true, 'Z'.freeze)}" end alias_method :iso8601, :xmlschema + alias_method :rfc3339, :xmlschema # Coerces time to a string for JSON encoding. The default format is ISO 8601. # You can get %Y/%m/%d %H:%M:%S +offset style by setting |