This queue is for tickets about the Time-Piece CPAN distribution.

Report information
The Basics
Id:
78879
Status:
open
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
STEVENL [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
1.20
Fixed in:
(no value)



Subject: strptime with single arg
strptime() is supposed to be the opposite of strftime(). Though not documented in the POD, strptime() sometimes works without a format argument when the time is in the default strftime format. These work: Time::Piece->strptime('Fri, 10 Aug 2012 05:37:42 GMT'); Time::Piece->strptime('Fri, 10 Aug 2012 05:37:42'); But these throw an "Error parsing time" exception: Time::Piece->strptime( localtime->strftime ); Time::Piece->strptime('Fri, 10 Aug 2012 05:37:42 AEST');
Seems like strptime() only support 'GMT'. I saw got_GMT as an arg in _strptime function. But what can we do if we need a timezone set? 在2012-八月-10 01:52:41 星期五时,STEVENL写到:
Show quoted text
> strptime() is supposed to be the opposite of strftime(). Though not > documented in the POD, strptime() sometimes works without a format > argument when the time is in the default strftime format. > > These work: > > Time::Piece->strptime('Fri, 10 Aug 2012 05:37:42 GMT'); > Time::Piece->strptime('Fri, 10 Aug 2012 05:37:42'); > > But these throw an "Error parsing time" exception: > > Time::Piece->strptime( localtime->strftime ); > Time::Piece->strptime('Fri, 10 Aug 2012 05:37:42 AEST');


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.