[ruby-core:87629] [Ruby trunk Bug#14862] Time.parse does not handle the time zone

From: hanmac@...
Date: 2018-06-25 09:29:51 UTC
List: ruby-core #87629
Issue #14862 has been updated by Hanmac (Hans Mackowiak).


Like i said, TimeZone is heavly OS depend and even DateTime.strptime might not return useful result!

you probably should not depend on that timezone value

like when turning a DateTime into a Time Object, the Zone does return nil for me

----------------------------------------
Bug #14862: Time.parse does not handle the time zone
https://bugs.ruby-lang.org/issues/14862#change-72651

* Author: mifrill (Aleksey Strizhak)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
First I would like to thank you for your work, thank you

The point is:
```
Time.parse("Ends from 28 Jun 2018 12:00 BST").zone

"MSK"

DateTime.parse("Ends from 28 Jun 2018 12:00 BST").zone

"+01:00"
```



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next