[rt-users] TicketSQL Date parse weird..
Stuart Browne
stuart.browne at ausregistry.com.au
Tue Jun 12 19:20:48 EDT 2012
> -----Original Message-----
> From: ruslan.zakirov at gmail.com [mailto:ruslan.zakirov at gmail.com]
> Sent: Wednesday, 13 June 2012 12:31 AM
> Subject: Re: [rt-users] TicketSQL Date parse weird..
>
> Hello Stuart,
>
> I've made a typo in the patch. It should be "ZONE" instead of "GMT".
> You can change code by hands after patching, it's close to line 208 in
> lib/RT/Date.pm.
>
> Also, make sure ParseDate module is the latest from the CPAN.
>
<snip>
Ensured I'm running the latest ParseDate - 2011.0517. Yes, I was running an older version. The output didn't appear different before changing GMT to ZONE (for before-10am).
After changing GMT to ZONE, this happened:
#
# BEFORE 10AM
#
#
# Before patch
#
[bekar at psg-apps tmp]$ ./test.pl
current time() output: 1339542313
fixed-date Time::ParseDate: 1339632000
tomorrow 10am Time::ParseDate: 1339632000
fixed-date RT::Date output: 1339668000
tomorrow 10am RT::Date output: 1339632000
timezone according to RT::Date: 36000
timezone according to RT::Date: 36000
#
# After patch
#
[bekar at psg-apps tmp]$ ./test.pl
current time() output: 1339542211
fixed-date Time::ParseDate: 1339632000
tomorrow 10am Time::ParseDate: 1339632000
fixed-date RT::Date output: 1339668000
tomorrow 10am RT::Date output: 0
timezone according to RT::Date: 36000
timezone according to RT::Date: 36000
So it doesn't like ZONE there it seems:
- GMT => $self->Timezone($args{'Timezone'}),
+ ZONE => $self->Timezone($args{'Timezone'}),
I'll try again after 14:00 (with GMT and the new ParseDate), although why RT::Date is returning 0 there is just odd.
Stuart
More information about the rt-users
mailing list