From: "felipec (Felipe Contreras)" Date: 2013-10-06T10:17:25+09:00 Subject: [ruby-core:57690] [ruby-trunk - Bug #7445] strptime('%s %z') doesn't work Issue #7445 has been updated by felipec (Felipe Contreras). File 0001-time-fix-strptime.patch added Also, if '%s' is used for UTC, then why do we get this? require 'time' Time.strptime('0', '%s') => 1969-12-31 18:00:00 -0600 I'm attaching a patch that does exactly what we want: Time.strptime('0', '%s') => 1970-01-01 00:00:00 +0000 Time.strptime('0 +0100', '%s %z') => 1970-01-01 01:00:00 +0100 ---------------------------------------- Bug #7445: strptime('%s %z') doesn't work https://bugs.ruby-lang.org/issues/7445#change-42305 Author: felipec (Felipe Contreras) Status: Rejected Priority: Low Assignee: tadf (tadayoshi funaba) Category: lib Target version: Next Major ruby -v: ruby 1.9.3p327 Backport: See: ruby -e "require 'date'; p DateTime.strptime('0 +0100', '%s %z').strftime('%s %z')" The timezone is ignored. -- http://bugs.ruby-lang.org/