[rt-users] Issue with scrip.
William Graboyes
william.graboyes at theportalgrp.com
Tue Sep 1 14:29:36 EDT 2009
Hi all,
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.
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.
my $CF_Obj = RT::CustomField->new($self->CurrentUser);
> my $cf_name = 'Ticket_resolveDate';
> my ( $sec, $min, $hour, $day, $mon, $year ) = localtime( time );
> my $cf_value = sprintf( '%d-%02d-%02d %02d:%02d:%02d', $year + 1900, $mon,
> $day, $hour, $min, $sec );
> $CF_Obj->LoadByName( Name => $cf_name,);
> $RT::Logger->debug( "Loaded \$CF_Obj->Name = ". $CF_Obj->Name() ."\n" );
>
>
> $CF_Obj->AddValueForObject( Object => $self->TicketObj,
> Content => $cf_value, );
> 1;
>
Thanks in advance,
Bill G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090901/b7f6205f/attachment.htm>
More information about the rt-users
mailing list