# Help with timestamps and values returned

**URL:** <https://discourse.nodered.org/t/help-with-timestamps-and-values-returned/32460>\
**Category:** General\
**Created:** [4 September 2020 22:07 UTC](https://discourse.nodered.org/t/help-with-timestamps-and-values-returned/32460 "2020-09-04T22:07:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 September 2020 22:07 UTC](https://discourse.nodered.org/t/help-with-timestamps-and-values-returned/32460/1 "2020-09-04T22:07:21Z")

</div>

I have a machine with an RTC.

For the sake of..... (something), I compare it to the software one at regular intervals.  
(Say 20 seconds)

To help keep things simple with the maths (and size of numbers) I resolve it down to "Seconds past midnight.

This may have a problem when Daylight savings kicks in, but more on that later.

Usually I am not seeing much of a problem, but nowadays I have recently hooked up an LED (physical one) and when a disparity is detected the LED comes on.

Of course there is the bad side to that. It seems to come on a fair bit.

I have the drift/acceptable slip set at 60000 and that seems to keep things happy most of the time.

But this morning when I got up there was an _NTP SLIP_ indication.

```auto
{"sw_time":966047,"rtc_time":1002016,"difference":35969,"_msgid":"1fce9e63.9c74a2","time":"2020-09-05 03:21:28","ttl":0,"_queuetimestamp":1599240098742,"_queueCount":1}

```

But I am needing someone to help me _scale_ these numbers.

How much is `1002016`?

How much is `60000`?

Yeah probably easy questions. But I feel I have to ask.

Thanks in advance.

Further research is that it is milliseconds.

So: `60000` is 6 seconds - yes?

`1002016` is about 16 minutes - yes?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 September 2020 22:41 UTC](https://discourse.nodered.org/t/help-with-timestamps-and-values-returned/32460/2 "2020-09-04T22:41:20Z")

</div>

Divide by 1000 (drop 3 numbers off the end)

So 60000 == 60s, 1002016 == 1002.016 sec == 16.7 min

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [4 September 2020 22:42 UTC](https://discourse.nodered.org/t/help-with-timestamps-and-values-returned/32460/3 "2020-09-04T22:42:34Z")

</div>

I just wanted to be sure.

I have had enough adventures down rabbit holes of late.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 September 2020 22:42 UTC](https://discourse.nodered.org/t/help-with-timestamps-and-values-returned/32460/4 "2020-09-18T22:42:49Z")

</div>

Closed on 18 September 2020 22:42 UTC

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