Unified PC Runtime V20 - Clock

Hi all!

Weird problem that has me stumped. Had this issue with a previous project to, but I gave up back then.

I cannot get the clock in the runtime window to show the correct time. It is consistently an hour off.
Below, you see to different scripts for the time, both show the same.. Any ideas?

1761872388356.png
1761872417019.png
1761872262333.png
 
Couple thoughts:

1) You could try substituting in something silly like "-04" for the timezone, just to make it different and see what happens.
2) The Output Format you specified at the IO field could be overruling the value you pass to it. It's expecting a datetime, and you're giving it a string. It might be erroring out and just using some system time or some default value. But Javascript is a bit fluffy when it comes to typing, so maybe it all sorts itself out in the back end.
3) I'm noticing that the DateTime format does match your output format, which is NOT what you get from the en-US locale.
4) Amsterdam and Daylight savings are both off by 1, so maybe they're cancelling each other out somehow (device ending DST at the wrong day maybe?) I'm terrible at time math, cant ever remember what's + and what's -.
5) Is the Unified runtime on a different device? It could have a different system time or time zone set compared to your laptop.
6) I think you can just use a clock object in HmiDigitalClock mode (under Appearance - style item), but it may only do time, not date.

Siemens have two functions to read the time of day. RD_SYS_T & RD_LOC_T. Could it be your reading system time and not local time or vice versa.
These functions are for the PLC, not the HMI, so OP's scenario is a little different.
 
Hi guys!

  1. No, it isn't DST. The RT is running on a Windows OS and the OS showing the correct time.
  2. I don't think the RD_SYS_T or RD_LOC_T are related here, I am not trying to show the PLC time. Just the PC/HMI time.
  3. The above RT image is taken from the PC that is running it, and visualizing it in a browser.
  4. I will do some testing with MK42 recommendations.
  5. What is strange is that these are straight from the example project and the script is from the manual.
 
Hi guys!

  1. No, it isn't DST. The RT is running on a Windows OS and the OS showing the correct time.
  2. I don't think the RD_SYS_T or RD_LOC_T are related here, I am not trying to show the PLC time. Just the PC/HMI time.
  3. The above RT image is taken from the PC that is running it, and visualizing it in a browser.
  4. I will do some testing with MK42 recommendations.
  5. What is strange is that these are straight from the example project and the script is from the manual.
OS is showing the correct time, but is it also the correct timezone? I'd ASSUME yes, but....
 
2) The Output Format you specified at the IO field could be overruling the value you pass to it. It's expecting a datetime, and you're giving it a string. It might be erroring out and just using some system time or some default value. But Javascript is a bit fluffy when it comes to typing, so maybe it all sorts itself out in the back end.

I think this was it. I removed the formatting and that works like a charm. Thank you for the guidance!

1762965694392.png
 

Similar Topics

Hello, I´m doing some work with a WinCC Unified V19 server and thin clients with redundant terminal servers. The goal is to be able to switch...
1
Replies
113
Views
Hola, estic intentant simular les meves pantalles WinCC Unificated, però em surt un 'Error General' al SIMATIC Runtime Manager com es mostra a...
2
Replies
356
Views
Hello, I've been working on a school project containing WinCC Unified PC Runtime running the visualization of my Siemens PLC program. Everything...
0
Replies
794
Views
Hello! Been fiddling with that Unified mess, have a new phenomenon that would be nice to resolve. Setup: A server with a Unified Runtime, two thin...
1
Replies
1,920
Views
Hello, Looking to brainstorm and hopefully decide on a good path forward for displaying many items on a small HMI. Hardware/Software: MTP700...
1
Replies
235
Views
Top