Service Desk Practitioners Forum
cancel

Problem with timestamp in text field, showing one hour wrong

SOLVED
Go to solution
Highlighted
Jan Gunnar Helg
Honored Contributor.

Problem with timestamp in text field, showing one hour wrong

Hi, running HPOVSD 4.5 SP21

We have made custom history fields for our service calls. We also timestamps entries added to the history log with the following code:

$DD$/$MM$/$YYYY$ $HH$:$MI$

Now when anyone enters a new history line its offset by 1 hour back in time. All other timestamps are correct however.
Also the time on the application server is correct, and the services has been restarted since daylight saving started.

What gives?
9 REPLIES
Ruth Porter
Acclaimed Contributor.

Re: Problem with timestamp in text field, showing one hour wrong

Hi there,

I am not entirely sure why this happens, but we altered the DB rules to use Registration:Created and Registration:Modified and then the time seems to come out right.

The downside is you need 2 rules - 1 for create and 1 for modify.

Hope this helps, Ruth
http://www.teamultra.net
Jan Gunnar Helg
Honored Contributor.

Re: Problem with timestamp in text field, showing one hour wrong

hmm ok

We currently have the "add new history line" as an UI rule, because its nice to see that the 64kb history field actually gets updated when you press the add button.

Can I keep my UI rule and still fix this?
George M. Meneg
Acclaimed Contributor.

Re: Problem with timestamp in text field, showing one hour wrong

Hello Jan,

It is not a bug. It is stated on the manual that $datetime$ variables are in UTC.
menes fhtagn
George M. Meneg
Acclaimed Contributor.

Re: Problem with timestamp in text field, showing one hour wrong

If you want your times to be in your timezone use the Current Date function instead of $DATETIME$ variables.
menes fhtagn
Jan Gunnar Helg
Honored Contributor.

Re: Problem with timestamp in text field, showing one hour wrong

I cant select CURRENTDATE when creating this rule...

Here it is:

New history line (Update Data) Add history line set to false; Call history set to (Concatenate [Call history] With (Concatenate $DD$/$MM$/$YYYY$ $HH$:$MI$ With (Concatenate (Current person) With (Concatenate %line.separator% With (Concatenate ------------------------------------------------------------------------------ With (Concatenate %line.separator% With (Concatenate [New history line] With (Concatenate %line.separator% With (Concatenate ------------------------------------------------------------------------------ With (Concatenate %line.separator% With %line.separator%)))))))))),
Clear recently entered history line (Update Data) New history line set to (Make empty)
Mark O'Loughlin
Acclaimed Contributor.

Re: Problem with timestamp in text field, showing one hour wrong

Hi,

instead of setting the date variables use the option to set an attribute and select registration modified instead. If you are updating a text field I think that the current date is not an option.

An other way to achieve this is to write the current date on save to a date field and use a DB rule to pick it up in the concetenation and another UI rule to clear the date field on open, however the above should work which means less rules.
Jan Gunnar Helg
Honored Contributor.

Re: Problem with timestamp in text field, showing one hour wrong

Mark,

Sadly that will not work if

A: User opens a new call and adds a new history line before saving the call = empty date

B: The user adds a history date to a call before issuing any other modifications = adds modified date of last user
Ruth Porter
Acclaimed Contributor.
Solution

Re: Problem with timestamp in text field, showing one hour wrong

Hi there,

If yiu use a DB rule, you can use Registartion;Created/Modified.

In a UI rule, I would suggest that if you have something which sets a custom field to current date/time and then use this in your concatenation rule.

Hope this helps, Ruth
http://www.teamultra.net
Jan Gunnar Helg
Honored Contributor.

Re: Problem with timestamp in text field, showing one hour wrong

Thanks guys, I know the limitations and my options now.