Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Set Time::DATE_FORMATS[:dpn] earlier in the rails init process
Browse files Browse the repository at this point in the history
  • Loading branch information
malakai97 committed Oct 26, 2016
1 parent 40fec08 commit 33e368f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ class Application < Rails::Application
end
end
end

Time::DATE_FORMATS[:dpn] = "%Y-%m-%dT%H:%M:%SZ"
1 change: 0 additions & 1 deletion config/initializers/time_formats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# See LICENSE.md for details.


Time::DATE_FORMATS[:dpn] = "%Y-%m-%dT%H:%M:%SZ"

def time_from_string(string_time)
Time.zone.parse(string_time.gsub(/\.[0-9]*Z\Z/, "Z"))
Expand Down

0 comments on commit 33e368f

Please sign in to comment.