Issue #7445 has been updated by felipec (Felipe Contreras).


It works perfectly fine in C:

./test '%s' '%s %z'
1369626774
1369626774 -0500

#include <stdio.h>
#include <time.h>

int main(int argc, char *argv[]) {
	struct tm *tm;
	time_t t;
	char buf[0x100];
	t = time(NULL);
	tm = localtime(&t);
	for (int i = 0; i < argc; i++) {
		strftime(buf, sizeof(buf), argv[i], tm);
		printf("%s\n", buf);
	}
	return 0;
}
----------------------------------------
Bug #7445: strptime('%s %z') doesn't work
https://bugs.ruby-lang.org/issues/7445#change-39535

Author: felipec (Felipe Contreras)
Status: Assigned
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/