Skip Menu |

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

Report information
The Basics
Id: 78879
Status: open
Priority: 0/
Queue: Time-Piece

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

Bug Information
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');