Skip Menu |

This queue is for tickets about the AnyEvent-XMPP CPAN distribution.

Report information
The Basics
Id: 62739
Status: resolved
Priority: 0/
Queue: AnyEvent-XMPP

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

Bug Information
Severity: Normal
Broken in: 0.51
Fixed in: (no value)



Subject: AnyEvent::XMPP::Util: $ENV{TZ} should not include a space after UTC
I'm getting a test failure: t/datetime.t ............... 1/22 # Failed test 'timestamp is UTC located' # at t/datetime.t line 31. # got: '1185821500' # expected: '1185813700' # Looks like you failed 1 test of 22. $ENV{TZ} get set to "UTC -2:10". I think that should be "UTC-02:10". The test passes with the following patch applied: diff --git a/lib/AnyEvent/XMPP/Util.pm b/lib/AnyEvent/XMPP/Util.pm index 7faae05..7d9bc92 100644 --- a/lib/AnyEvent/XMPP/Util.pm +++ b/lib/AnyEvent/XMPP/Util.pm @@ -519,7 +519,7 @@ sub xmpp_datetime_as_timestamp { my ($s, $m, $h, $md, $mon, $year, $tz) = from_xmpp_datetime ($string); my $otz = $ENV{TZ}; - $ENV{TZ} = ($tz =~ /^([+-])(\d{2}):(\d{2})$/ ? "UTC $tz" : ""); + $ENV{TZ} = ($tz =~ /^([+-])(\d{2}):(\d{2})$/ ? "UTC$tz" : ""); POSIX::tzset (); my $ts = POSIX::mktime ($s, $m, $h, $md, $mon, $year);
Show quoted text
> The test passes with the following patch applied:
Confirmed.
This has been fixed with 0.52 already.