LocalTimezone problem with default queue due

My local timezone is Hongkong(GMT+8) and I’ve set it in my RT_SiteConfig.pm.

My problem is, I set the due day of a queue to 7 days and when I am
trying to create a ticket using the web GUI, the ‘Due’ field is set to
"CurrentTime + 7 days - 8 hours". (e.g. my local time is now Feb 22 2005
14:44, but the due day will be appeared as Mar 1 2005 06:44).

Anyone has the same problem? Anyone know how to fix it?

I eventually modify the line in /share/html/Ticket/Create.html as
following to solve it:

if ($QueueObj->DefaultDueIn && !$ARGS{‘Due’}) {
my $default_due = RT::Date->new($session{‘CurrentUser’});
$default_due->SetToNow();
$default_due->AddDays($QueueObj->DefaultDueIn);

$ARGS{‘Due’} = $default_due->ISO(); # Original code

 $ARGS{'Due'} = $default_due->AsString();

}

Stephen Fung wrote:

I eventually modify the line in /share/html/Ticket/Create.html as
following to solve it:

if ($QueueObj->DefaultDueIn && !$ARGS{‘Due’}) {
my $default_due = RT::Date->new($session{‘CurrentUser’});
$default_due->SetToNow();
$default_due->AddDays($QueueObj->DefaultDueIn);

$ARGS{‘Due’} = $default_due->ISO(); # Original code

 $ARGS{'Due'} = $default_due->AsString();

}

Good catch. The problem above is a bug. ISO dates are stored in the
database, but dates for the user are in local time. The original line
makes the default date (which the user enters) ISO, and it gets ISO’ed,
again, when stored in the database.

Russell Mosemann, Ph.D. * Computing Services * Concordia University, Nebraska
“A no-smoking section in a restaurant is like a no-peeing
section in a swimming pool.”