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

Kevin Falcone falcone at bestpractical.com
Tue Jun 17 15:28:13 EDT 2014


On Tue, Jun 10, 2014 at 12:21:35PM +1000, Alex Peters wrote:
> my $due_date = RT::Date->new($RT::SystemUser);
> $due_date->Set(
>   Value   => '11am Wednesday',
>   Format  => 'unknown',
> );
> my $ticket = RT::Ticket->new($RT::SystemUser);
> $ticket->Create(
>   Queue   => '<queue name>',
>   Subject => '<ticket title>',
>   Due     => $due_date,
> );

Ticket->Create doesn't consume an RT::Date object, it expects ISO in
the user's timezone.  Running your code as provided, I get no Due
Date and
[63270] [Tue Jun 17 19:26:57 2014] [warning]: Couldn't parse date
'RT::Date=HASH(0x7fbd94003618)' as a ISO format (lib/RT/Date.pm:209)

I'm guessing something else is setting your Due date.

-kevin
-------------- 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/20140617/4dcb3892/attachment.sig>


More information about the rt-users mailing list