<div dir="ltr"><div>RT::Extension::RepeatTicket doesn't suit my specific needs, so I'm implementing a solution using scrips and templates.<br></div><div><br></div><div>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.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 20 June 2014 02:31, Kevin Falcone <span dir="ltr"><<a href="mailto:falcone@bestpractical.com" target="_blank">falcone@bestpractical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thu, Jun 19, 2014 at 11:25:52AM +1000, Alex Peters wrote:<br>
> The code posted in my original message, minus the $ticket->Create call,<br>
> generates debug output showing the problem independent of ticket creation.  In<br>
> that message I've highlighted the  discrepancies in that debug output in red. <br>
> Your comments on that specific output would be greatly appreciated.<br>
><br>
> I don't believe that the date/time configuration options are relevant, because<br>
> I'm explicitly specifying "11am Wednesday" in an RT::Date->Set call and getting<br>
> an epoch for "11am Tuesday."  My timezone is not offset from GMT by 24 hours.<br>
<br>
</div>Since RT::Date uses Time::ParseDate, I'm not sure that your syntax is<br>
valid.<br>
<br>
<a href="https://metacpan.org/pod/Time::ParseDate" target="_blank">https://metacpan.org/pod/Time::ParseDate</a><br>
<br>
Time::ParseDate is going to default to shenanigans when you feed it<br>
bad data.<br>
<br>
I'm not yet convinced of an actual RT::Date bug here, just bad input<br>
to ParseDate and timezone confusion (remember whose timezone is<br>
applied when you create an RT::Date with the System User).<br>
<br>
use lib './lib';<br>
use RT -init;<br>
<div class=""><br>
my $due_date = RT::Date->new($RT::SystemUser);<br>
$due_date->Set(<br>
</div> Value => '11am tomorrow',<br>
 Format => 'unknown',<br>
 Timezone => 'America/New_York',<br>
);<br>
print $due_date->ISO;<br>
<br>
works fine for me, using days in the parser does not, but that does not<br>
surprise me, Time::ParseDate is fragile, although doesn't try to use the<br>
Julian calendar as often as other parsing modules.<br>
<br>
Have you considered<br>
<a href="https://metacpan.org/pod/RT::Extension::RepeatTicket" target="_blank">https://metacpan.org/pod/RT::Extension::RepeatTicket</a><br>
<span class="HOEnZb"><font color="#888888"><br>
-kevin<br>
</font></span><br>--<br>
RT Training - Boston, September 9-10<br>
<a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br></blockquote></div><br></div>