mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #21552 from ronakjangir47/fixed_docs
Fixed Time conversion example for UTC time zone [ci skip]
This commit is contained in:
commit
0c66326124
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ class String
|
|||
# "06:12".to_time # => 2012-12-13 06:12:00 +0100
|
||||
# "2012-12-13 06:12".to_time # => 2012-12-13 06:12:00 +0100
|
||||
# "2012-12-13T06:12".to_time # => 2012-12-13 06:12:00 +0100
|
||||
# "2012-12-13T06:12".to_time(:utc) # => 2012-12-13 05:12:00 UTC
|
||||
# "2012-12-13T06:12".to_time(:utc) # => 2012-12-13 06:12:00 UTC
|
||||
# "12/13/2012".to_time # => ArgumentError: argument out of range
|
||||
def to_time(form = :local)
|
||||
parts = Date._parse(self, false)
|
||||
|
|
Loading…
Reference in a new issue