Forum: Ruby-core [ruby-trunk - Bug #7445][Open] strptime('%s %z') doesn't work

Posted by felipec (Felipe Contreras) (Guest)
on 2012-11-27 09:02
(Received via mailing list)
Issue #7445 has been reported by felipec (Felipe Contreras).

----------------------------------------
Bug #7445: strptime('%s %z') doesn't work
https://bugs.ruby-lang.org/issues/7445

Author: felipec (Felipe Contreras)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3p327


See:

    ruby -e "require 'date'; p DateTime.strptime('0 +0100', '%s 
%z').strftime('%s %z')"

The timezone is ignored.
Posted by charliesome (Charlie Somerville) (Guest)
on 2012-11-27 14:33
(Received via mailing list)
Issue #7445 has been updated by charliesome (Charlie Somerville).

File bug-7445.patch added

I've attached a patch that fixes this.
----------------------------------------
Bug #7445: strptime('%s %z') doesn't work
https://bugs.ruby-lang.org/issues/7445#change-34040

Author: felipec (Felipe Contreras)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3p327


See:

    ruby -e "require 'date'; p DateTime.strptime('0 +0100', '%s 
%z').strftime('%s %z')"

The timezone is ignored.
Posted by usa (Usaku NAKAMURA) (Guest)
on 2012-11-27 15:36
(Received via mailing list)
Issue #7445 has been updated by usa (Usaku NAKAMURA).

Category set to lib
Status changed from Open to Assigned
Assignee set to tadf (tadayoshi funaba)
Target version set to 2.0.0


----------------------------------------
Bug #7445: strptime('%s %z') doesn't work
https://bugs.ruby-lang.org/issues/7445#change-34044

Author: felipec (Felipe Contreras)
Status: Assigned
Priority: Normal
Assignee: tadf (tadayoshi funaba)
Category: lib
Target version: 2.0.0
ruby -v: ruby 1.9.3p327


See:

    ruby -e "require 'date'; p DateTime.strptime('0 +0100', '%s 
%z').strftime('%s %z')"

The timezone is ignored.
Posted by tadf (tadayoshi funaba) (Guest)
on 2012-11-28 12:01
(Received via mailing list)
Issue #7445 has been updated by tadf (tadayoshi funaba).

Priority changed from Normal to Low
Target version changed from 2.0.0 to Next Major

this is intentional behaviour.
%s cannot represent localtime with offset.
%s implies utc.
this is just odd as a date.

but, it's an option.
we may be able to adopt this feature on next major.
i'm not sure at the present time.
----------------------------------------
Bug #7445: strptime('%s %z') doesn't work
https://bugs.ruby-lang.org/issues/7445#change-34080

Author: felipec (Felipe Contreras)
Status: Assigned
Priority: Low
Assignee: tadf (tadayoshi funaba)
Category: lib
Target version: Next Major
ruby -v: ruby 1.9.3p327


See:

    ruby -e "require 'date'; p DateTime.strptime('0 +0100', '%s 
%z').strftime('%s %z')"

The timezone is ignored.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.