Does anyone have script to convert free text date and time to datetime in scrip and then add/minus time for different time zone ?
How to set it back to datetime custom field?
It is hard to figure out how to code it because no much examples to follow and make you understand to use the objects and method.
my $date = RT::Date->new($ticket->CurrentUser);
my ($ret, $msg) = $date->Set( Format => 'unknown', Value => '3 days ago' );
RT::Logger->error($msg) unless $ret;
my ($ret, $msg) = $date->AddSeconds(100);
RT::Logger->error($msg) unless $ret;
my ($ret, $msg) = $ticket->AddCustomFieldValue( Field => 'Foo', Value => $date->ISO );
RT::Logger->error($msg) unless $ret;