[rt-users] ticket created from CLI script with wrong Due date; timezone issue?

Kevin Falcone 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
bad data.

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',
print $due_date->ISO;

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
Type: application/pgp-signature
Size: 235 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140619/301cc18b/attachment.pgp>

More information about the rt-users mailing list