use RT::Date
RT Date is a simple Date Object designed to be speedy and easy for RT to use
The fact that it assumes that a time of 0 means "never" is probably a bug.
takes a param hash with the fields 'Format' and 'Value'
if $args->{'Format'} is 'unix', takes the number of seconds since the epoch
If $args->{'Format'} is ISO, tries to parse an ISO date.
If $args->{'Format'} is 'unknown', require Time::ParseDate and make it figure things out. This is a heavyweight operation that should never be called from within RT's core. But it's really useful for something like the textbox date entry where we let the user do whatever they want.
If $args->{'Value'} is 0, assumes you mean never.
Sets the date to midnight (at the beginning of the day) GMT Returns the unixtime at midnight.
Takes either an RT::Date object or the date in unixtime format as a string
Returns the differnce between $self and that time as a number of seconds
Takes either an RT::Date object or the date in unixtime format as a string
Returns the differnce between $self and that time as a number of seconds as as string fit for human consumption
Takes a number of seconds. returns a string describing that duration
Takes nothing
Returns a string that's the differnce between the time in the object and now
Returns the object\'s time as a string with the current timezone.
Takes a number of seconds as a string
Returns the new time
Adds 24 hours * $DAYS to the current time
Adds 24 hours to the current time
Optionally takes a date in unix seconds since the epoch format. Returns the number of seconds since the epoch
Takes nothing
Returns the object's date in ISO format