[rt-users] ticket created from CLI script with wrong Due date; timezone issue?
falcone at bestpractical.com
Thu Jun 19 12:31:33 EDT 2014
On Thu, Jun 19, 2014 at 11:25:52AM +1000, Alex Peters wrote:
> The code posted in my original message, minus the $ticket->Create call,
> generates debug output showing the problem independent of ticket creation. In
> that message I've highlighted the discrepancies in that debug output in red.
> Your comments on that specific output would be greatly appreciated.
> I don't believe that the date/time configuration options are relevant, because
> I'm explicitly specifying "11am Wednesday" in an RT::Date->Set call and getting
> an epoch for "11am Tuesday." My timezone is not offset from GMT by 24 hours.
Since RT::Date uses Time::ParseDate, I'm not sure that your syntax is
Time::ParseDate is going to default to shenanigans when you feed it
I'm not yet convinced of an actual RT::Date bug here, just bad input
to ParseDate and timezone confusion (remember whose timezone is
applied when you create an RT::Date with the System User).
use lib './lib';
use RT -init;
my $due_date = RT::Date->new($RT::SystemUser);
Value => '11am tomorrow',
Format => 'unknown',
Timezone => 'America/New_York',
works fine for me, using days in the parser does not, but that does not
surprise me, Time::ParseDate is fragile, although doesn't try to use the
Julian calendar as often as other parsing modules.
Have you considered
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 235 bytes
Desc: not available
More information about the rt-users