Strange Time Difference in CRON Plus Node Trigger Time & Output

without wading through the code:

  1. debug timestamp is applied client side before display
  2. sleepy tab has queued events
  3. when tab awakes and runs the JS code to enumerate the debug messages, the current time is used

It is only a recent thing (sleepy tabs) and there may be a better way to handle this, but I dont know what.

For the moment I think a note somewhere that this occurs, if someone wants to check the actual time an event happened the log gives the answer.

I will note this as resolved

In theory we could somehow also send a timestamp from server side do the queue had the correct data in it but I bet we then get timezone issues on display side:-)

Not saying I wrote (then retracted) a very VERY similar comment :stuck_out_tongue:

1 Like

I know nothing about how that would work, but --- as long as the time (including time zone) is the same as the time the message was actually recorded by whatever issued it, does it matter what time zone the display side is at?

So for example, if cronplus issues a scheduled output at 21:00 (whatever time zone) I would like the server debug time to reflect that, even if MY display time zone is different. How does that work at the moment, if I am an hour in advance of the server does the debug show the server time, or my time?

The time stamp is generated in the browser, so it will be your local time, at the time the messages is displayed (as you have discovered - not necessarily the time it was sent)

System and processing of date/time values should ALWAYS be in UTC/Zulu/GMT to avoid all issues around DST and timezones.

Only user display and user input should ever be in local time.

Does this suggest that the sleeping tab has kept the socket open so that it is still receiving the debug messages (and queuing them) in its sleep? If I suspend the laptop then messages that are generated while it is suspended get lost, not queued. I presume that happens because the socket drops out.

I think that is only possible if the page has a service worker that handles the socket, it won't happen with a standard page I know that. Not sure Just checked, the Editor doesn't use a service worker.

Does that mean that the messages are being queued in node red?

I can't think of another mechanism - doesn't mean there isn't one of course. :slight_smile:

I wonder what the difference is between a sleeping tab and a suspended laptop.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.