eWon TAGS - how to add UTC timestamp value as tag

Is it posible for a Tag to be created that displays UTC timestamp from the eWon? Thank you.

Hi @acj

Here’s an example of a string tag I made that updates every 5 seconds with the time:

Tset 1, 5

Ontimer 1, “@grab_time()”

Function grab_time()
T$ = TIME$
Print T$

current_time@ = T$
Endfn

Hi Tim,

Thank you - apologies for not being clear in the original question, I am actually trying to create the UTC time in a UDINT (or DINT) integer format, like ‘1585583406’ shown on this website:

Is this possible?

I think something like this should be possible. we don’t have anything already setup for this but if you want to either run some code in Basic or Java, you should be able to calculate the date by grabbing information from our timestamp and convert it.

Tim,
I tried to do this and created the tag and tried to run the script. The system does not let me save the script and execute it. Do you know what could be the issue?

[update after a call]

We were able to get the code to run by deleting the previous code that was in the basic section and then running it again