System Function <> treats the input time as UTC?


I am using a Status Chart.
When the mouse hovers on the Chart and I captured the timestamp as a big integer, so I converted it to the datetime as follows.

SelectedTime1 = datetime.datetime.fromtimestamp(selectedTimeStamp)

I have verified the timestamp and it works.

I then converted it to SelectedTime2 through the system function -
SelectedTime2 =,“yyyy-MM-dd HH:mm:ss”)

However, I checked the data. I have found that SelectedTime1 and SelectedTime2 have 4 hours of difference. I think the treats the SelectedTime1 as a UTC time and convert it into Eastern Time.

e.g. This is my results
SelectedTime1: 2021-05-12 03:41:07.549000 SelectedTime2: Tue May 11 23:41:07 EDT 2021
The server is running at the Eastern Time Zone.

What I want is
SelectedTime1: 2021-05-12 03:41:07.549000 SelectedTime2: Tue May 12 03:41:07 EDT 2021

How can I force the function not to treat the SelectedTime1 as UTC time, instead use it as Local Time ? Or is there any ways I can use to resolve this issue.

Sorry… I am new to the ignition. Please help. Thanks.


What do you get if you use

selectedTime  =*1000))

Hi Jordan,

It works… Thanks so much for your help.


1 Like