Hi all,<br><br>I am having a strange issue with a script, I was wondering if those who are a bit more 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 behind the current date.  this has me very confused, there are a few that wrote the date properly, (about 17 out of 330).  So with out further complications, here is a copy of the scrip.<br>
<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">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, $min, $sec );<br>$CF_Obj->LoadByName( Name => $cf_name,);<br>
   $RT::Logger->debug( "Loaded \$CF_Obj->Name = ". $CF_Obj->Name() ."\n" );<br> <br><br>$CF_Obj->AddValueForObject( Object  => $self->TicketObj,<br>                           Content => $cf_value, );<br>
1;<br></blockquote><br>Thanks in advance,<br>Bill G.<br>