Hi Chris,<div>this i already tried. The problem is more that the timezone offset is only for display, not for calculation used (so far i figured already) and i have really no idea how to fix it. one possible way could be:</div>
<div><br></div><div>1. If a user is entering this fields, check the users timezone and use the offset to work with the utc values...</div><div><br></div><div>i will play around a little more...</div><div><br></div><div>Torsten<br>
<br><div class="gmail_quote">2010/7/1 Christian Loos <span dir="ltr"><<a href="mailto:cloos@netcologne.de">cloos@netcologne.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Torsten,<br>
<br>
try this:<br>
<div class="im"><br>
my $DUEDATE = $self->TicketObj->FirstCustomFieldValue('Date');<br>
my $DUETIME = $self->TicketObj->FirstCustomFieldValue('Time');<br>
my $DUE = $DUEDATE." ".$DUETIME;<br>
</div>my $DATE = RT::Date->new( $session{'CurrentUser'} );<br>
$DATE->Set(<br>
    Format => 'unknown',<br>
    Value => $DUE,<br>
    Timezone => 'UTC',<br>
);<br>
$self->TicketObj->SetDue( $DATE->ISO );<br>
return 1;<br>
<br>
Chris<br>
<br>
Am 30.06.2010 18:44, schrieb Torsten Brumm:<br>
<div><div></div><div class="h5">> Hi RT Users,<br>
> since we are planing our RT 3.8 migration, we are cross checking all our<br>
> scrips and some scrips with time calculaltions driving me mad.<br>
><br>
> Example from RT 3.6.x<br>
><br>
> We have two CF's: Date and the other Time<br>
><br>
> CF.Date<br>
> CF.Time<br>
><br>
> The user is entering the date and the time in utc normally - our RT is<br>
> running in UTC<br>
><br>
> Then i have a tiny scrip:<br>
><br>
> my $DUEDATE = $self->TicketObj->FirstCustomFieldValue('Date');<br>
> my $DUETIME = $self->TicketObj->FirstCustomFieldValue('Time');<br>
> my $DUE = $DUEDATE." ".$DUETIME;<br>
> $self->TicketObj->SetDue($DUE);<br>
> return 1;<br>
><br>
> Under RT 3.6. RT was setting this simply to the entered values, all was<br>
> fine.<br>
><br>
> Now with RT 3.8 RT the user is able to enter his timezone offset for<br>
> Display and RT is adding the Timezone Difference to this value.<br>
><br>
> Any hints how to prevent this? or to make sure to get the correct value,<br>
> entered by the user?<br>
><br>
> Torsten<br>
><br>
><br>
> --<br>
> MFG<br>
><br>
> Torsten Brumm<br>
><br>
> <a href="http://www.brumm.me" target="_blank">http://www.brumm.me</a><br>
> <a href="http://www.elektrofeld.de" target="_blank">http://www.elektrofeld.de</a><br>
><br>
><br>
><br>
><br>
</div></div>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
> Buy a copy at <a href="http://rtbook.bestpractical.com" target="_blank">http://rtbook.bestpractical.com</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>MFG<br><br>Torsten Brumm<br><br><a href="http://www.brumm.me">http://www.brumm.me</a><br><a href="http://www.elektrofeld.de">http://www.elektrofeld.de</a><br>
</div>