[rt-users] ticket created from CLI script with wrong Due date; timezone issue?
alex at peters.net
Mon Jun 30 02:45:04 EDT 2014
RT::Extension::RepeatTicket doesn't suit my specific needs, so I'm
implementing a solution using scrips and templates.
I should have given more regard to your earlier remark about the time
parsing configuration options—after playing with Time::ParseDate
separately, I determined that PREFER_FUTURE needs to be set. Setting
$AmbiguousDayInFuture to 1 has fixed my problem.
On 20 June 2014 02:31, Kevin Falcone <falcone at bestpractical.com> wrote:
> 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
> > Your comments on that specific output would be greatly appreciated.
> > I don't believe that the date/time configuration options are relevant,
> > I'm explicitly specifying "11am Wednesday" in an RT::Date->Set call and
> > an epoch for "11am Tuesday." My timezone is not offset from GMT by 24
> 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
> RT Training - Boston, September 9-10
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rt-users