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 valid. https://metacpan.org/pod/Time::ParseDate 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); $due_date->Set( 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 https://metacpan.org/pod/RT::Extension::RepeatTicket -kevin
pgpRxUaBTT9MK.pgp
Description: PGP signature
-- RT Training - Boston, September 9-10 http://bestpractical.com/training