Hi Kevin,<br><br>Thanks for the Quick response.  Is there any good documentation anywhere on the RT:Date functions? A quick search of the wiki resulted in nothing more or less, so for the time being, I believe the solution should be something along the lines of:<br>
<br><br>
      my $CF_Obj = RT::CustomField->new($self->CurrentUser);<br><div class="im">
      my $cf_name = 'Ticket_resolveDate';<br>
      my ( $sec, $min, $hour, $day, $mon, $year ) = localtime( time );<br>
      my $cf_value = sprintf( '%d-%02d-%02d %02d:%02d:%02d', $year + 1900, $mon + 1, $day, $hour,<br>
      $min, $sec );<br>
      $CF_Obj->LoadByName( Name => $cf_name,);<br>
      $RT::Logger->debug( "Loaded \$CF_Obj->Name = ". $CF_Obj->Name() ."\n" );<br>
<br>
      $CF_Obj->AddValueForObject( Object => $self->TicketObj,<br>
      Content => $cf_value, );<br>
      1;</div><br>Thanks,<br>Bill G.<br><br><div class="gmail_quote">On Tue, Sep 1, 2009 at 11:35 AM, Kevin Falcone <span dir="ltr"><<a href="mailto:falcone@bestpractical.com">falcone@bestpractical.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Tue, Sep 01, 2009 at 11:29:36AM -0700, William Graboyes wrote:<br>
>    Hi all,<br>
><br>
>    I am having a strange issue with a script, I was wondering if those who are a bit more<br>
>    proficient than myself can give me a couple of pointers.<br>
><br>
>    The issue is that sometimes, quite regularly actually, it is printing a date that is 1 month<br>
>    behind the current date. this has me very confused, there are a few that wrote the date<br>
>    properly, (about 17 out of 330). So with out further complications, here is a copy of the<br>
>    scrip.<br>
<br>
</div>You may want to read<br>
$ perldoc -f localtime<br>
<br>
which explains that $mon is not 1-12<br>
<br>
Also, you may want one of the functions from RT::Date rather than<br>
doing it by hand.<br>
<br>
-kevin<br>
<div class="im"><br>
><br>
>      my $CF_Obj = RT::CustomField->new($self->CurrentUser);<br>
>      my $cf_name = 'Ticket_resolveDate';<br>
>      my ( $sec, $min, $hour, $day, $mon, $year ) = localtime( time );<br>
>      my $cf_value = sprintf( '%d-%02d-%02d %02d:%02d:%02d', $year + 1900, $mon, $day, $hour,<br>
>      $min, $sec );<br>
>      $CF_Obj->LoadByName( Name => $cf_name,);<br>
>      $RT::Logger->debug( "Loaded \$CF_Obj->Name = ". $CF_Obj->Name() ."\n" );<br>
><br>
>      $CF_Obj->AddValueForObject( Object => $self->TicketObj,<br>
>      Content => $cf_value, );<br>
>      1;<br>
</div>_______________________________________________<br>
<a href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users" target="_blank">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a><br>
<br>
Community help: <a href="http://wiki.bestpractical.com" target="_blank">http://wiki.bestpractical.com</a><br>
Commercial support: <a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a><br>
<br>
<br>
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
Buy a copy at <a href="http://rtbook.bestpractical.com" target="_blank">http://rtbook.bestpractical.com</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Bill Graboyes<br>On Assignment At: <br>Toyota Motor Sales, USA, Inc.<br>Consumer Portal Delivery<br>Office: (310) 468-6754<br>Cell: (714) 515-8312<br>