# How is the Octave edge device system time set?

**URL:** <https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639>\
**Category:** Octave\
**Created:** [December 10, 2019, 12:44pm UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639 "2019-12-10T12:44:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnofleek](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/johnofleek/32/4726_2.png) [@johnofleek](https://forum.sierrawireless.com/u/johnofleek)\
**Post date:** [December 10, 2019, 12:44pm UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/1 "2019-12-10T12:44:07Z")

</div>

How is the Octave edge device system time set?

I know that Legato can use NITZ and GPS. However they are often not available.

To workaround this on standard Legato systems we can use internet time but this won’t work with Octave as the edge device doesn’t have open internet access

Thanks in advance

John

---

<div class="post-metadata">

**Author:** ![djudkins](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@djudkins](https://forum.sierrawireless.com/u/djudkins)\
**Post date:** [January 8, 2020, 6:12pm UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/2 "2020-01-08T18:12:05Z")

</div>

Hi John,

You can use the resource util/time to get the current UTC date/time

---

<div class="post-metadata">

**Author:** ![johnofleek](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/johnofleek/32/4726_2.png) [@johnofleek](https://forum.sierrawireless.com/u/johnofleek)\
**Post date:** [January 21, 2020, 2:28pm UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/3 "2020-01-21T14:28:28Z")

</div>

I can’t see a way to set the local WP7xxx (edge) date/time from util/time - isn’t that a time measurement that is sent from the  
edge–\>cloud ???

Looking at some of the transactions over the ORP link and also local WPxxxx time without GPS or NITZ (not available in a lot of geos) both stick to a time in the 1980s which is what I would expect Linux to do

This is ORP remote debug showing the issue

```auto
recv frame: {'responseType': 'c', 'status': 'OK', 'timestamp': '315965155.938848', 'path': 'sensors/controlsettingsdownj', 'data': '{"Fog_roller_OFF":290}'} ()

```

In this case the Date/time is Sun, 06 Jan 1980 00:05:55 GMT

I see the same sort of thing on the command line

```auto
root@swi-mdm9x28-wp:~# date
Sun Jan 6 02:16:29 +02 1980

```

---

<div class="post-metadata">

**Author:** ![djudkins](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@djudkins](https://forum.sierrawireless.com/u/djudkins)\
**Post date:** [January 21, 2020, 2:36pm UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/4 "2020-01-21T14:36:33Z")

</div>

The util/time is the network time.

---

<div class="post-metadata">

**Author:** ![johnofleek](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/johnofleek/32/4726_2.png) [@johnofleek](https://forum.sierrawireless.com/u/johnofleek)\
**Post date:** [January 24, 2020, 10:16am UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/5 "2020-01-24T10:16:24Z")

</div>

Hi David

Which edge device network time source do you mean?

**Cellular network time**? In that case for a lot of the world it isn’t supported by the local cellular network (NITZ probably isn’t supported on carriers not on this list [https://en.wikipedia.org/wiki/NITZ](https://en.wikipedia.org/wiki/NITZ)) in the UK for example it’s very rare to get a NITZ event even on EE

**NTP**? In the case of using IP network time, such as NTP ([https://www.ntppool.org/en/](https://www.ntppool.org/en/)), to set the edge device time then there is a problem - Octave edge is on a private cellular WAN network and hence can’t get to a standard internet NTP server. BTW as far as I know Legato doesn’t have a built in mechanism to set the time via NTP anyway. In the past to workaround the edge time issue I added a Legato app which set the time via NTP

Maybe there could be a an optional time push from the Octave cloud to the edge?

---

<div class="post-metadata">

**Author:** ![jvermillard](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jvermillard/32/4626_2.png) [@jvermillard](https://forum.sierrawireless.com/u/jvermillard)\
**Post date:** [February 4, 2020, 9:20am UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/6 "2020-02-04T09:20:56Z")

</div>

HI John, we are working on getting NTP started automatically, in the mean time you can use this command:  
ntpd -dnq -p [ntp.airvantage.net](http://ntp.airvantage.net) to get your device time updated

---

<div class="post-metadata">

**Author:** ![johnofleek](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/johnofleek/32/4726_2.png) [@johnofleek](https://forum.sierrawireless.com/u/johnofleek)\
**Post date:** [July 6, 2020, 9:50am UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/7 "2020-07-06T09:50:28Z")

</div>

Hi Julien

Trying the (latest) mangOH yellow Octave version [3.0.0-pre23April2020-mangOH-0](https://octave.sierrawireless.io/device/details?firmwareId=y5ec230de74a486044df87e25)

Edge time is not being correctly set in the UK

```auto
root@swi-mdm9x28-wp:~# date
Sun Jan 6 01:09:44 +01 198

```

and  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/sierrawireless/original/2X/7/70c6d95a5000ad1f4385e65e2d91a517e08e7730.png)

---

<div class="post-metadata">

**Author:** ![jvermillard](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jvermillard/32/4626_2.png) [@jvermillard](https://forum.sierrawireless.com/u/jvermillard)\
**Post date:** [July 10, 2020, 8:22am UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/8 "2020-07-10T08:22:42Z")

</div>

Hi, Jon  
NTP is integrated, it’s going to be released for 3.0.0 RC2

---

<div class="post-metadata">

**Author:** ![johnofleek](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/johnofleek/32/4726_2.png) [@johnofleek](https://forum.sierrawireless.com/u/johnofleek)\
**Post date:** [August 4, 2021, 10:49am UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/9 "2021-08-04T10:49:47Z")

</div>

Hi Julien

Sorry for resurrecting this old thread. But I think it’s better than starting a new one.

I had a look in the release notes but I haven’t managed to find when ntp was added to the Octave edge FW. But I do know that with R3+ FW the time is set on UK Octave system (little NITZ support in UK).

When is the Octave time set vs the state of the Octave edge system?

For example

- Is time always set before the user edge code runs?
- or should the user code check to see if the time is valid?
- what happens if there is no network coverage?

I’m thinking in particular of a boot driven edge action which has something like this

```auto
function (event) {
  console.log(event)

}    

```

logs the following

```auto
  {"value":{"state":"idle"},"timestamp":1627896099.259948}

```

---

<div class="post-metadata">

**Author:** ![njoyeux](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/njoyeux/32/6714_2.png) [@njoyeux](https://forum.sierrawireless.com/u/njoyeux)\
**Post date:** [August 23, 2021, 9:12am UTC](https://forum.sierrawireless.com/t/how-is-the-octave-edge-device-system-time-set/18639/10 "2021-08-23T09:12:03Z")

</div>

Hi John,  
If current system date is obviously wrong (if current year is \< 2021), then the NTP service is used at the start of Octave applications, before the user edge code runs.  
If there is no network coverage then the system date can’t be corrected at boot and will be fixed once coverage is reached.  
Regards,  
Nicolas
