# Network time and rtc

**URL:** <https://forum.legato.io/t/network-time-and-rtc/3429>\
**Category:** Uncategorized\
**Created:** [July 10, 2018, 5:19pm UTC](https://forum.legato.io/t/network-time-and-rtc/3429 "2018-07-10T17:19:57Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lotam](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@lotam](https://forum.legato.io/u/lotam)\
**Post date:** [July 13, 2018, 10:00am UTC](https://forum.legato.io/t/network-time-and-rtc/3429/2 "2018-07-13T10:00:59Z")

</div>

Hi subrahmaniam,

Per understanding, if you want to do all in your application, you need to develop according to NTP protocol (i.e. RFC-1305, RFC-5905).

In latest Legato release, le\_data\_GetDate() and le\_data\_GetTime() is introduced for NTP support to ease development.  
[https://docs.legato.io/latest/c\_le\_data.html#c\_le\_data\_time](https://docs.legato.io/latest/c_le_data.html#c_le_data_time)

But for your case using 16.07, I think the easiest way is to use Linux script or call those Linux tool in your app.

You may refer to my test below:

> root@swi-mdm9x15:~# cm data connect 30&  
> root@swi-mdm9x15:~# Connected through interface ‘rmnet0’
> 
> root@swi-mdm9x15:~# ntpd -p [pool.ntp.org](http://pool.ntp.org)  
> root@swi-mdm9x15:~# date  
> Fri Jul 13 09:50:43 UTC 2018  
> root@swi-mdm9x15:~# cm rtc set “$(date +‘%d %b %Y %H:%M:%S’)”  
> root@swi-mdm9x15:~# cm rtc  
> 13 Jul 2018 09:50:58  
> root@swi-mdm9x15:~#

Hope it help.  
Thx

---

_[View the full topic](https://forum.legato.io/t/network-time-and-rtc/3429)._
