# NTP time synchro using Legato API on FX30

**URL:** <https://forum.legato.io/t/ntp-time-synchro-using-legato-api-on-fx30/6992>\
**Category:** Legato Application Framework\
**Created:** [January 26, 2026, 11:36am UTC](https://forum.legato.io/t/ntp-time-synchro-using-legato-api-on-fx30/6992 "2026-01-26T11:36:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas.B](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nicolas.B](https://forum.legato.io/u/Nicolas.B)\
**Post date:** [January 26, 2026, 11:36am UTC](https://forum.legato.io/t/ntp-time-synchro-using-legato-api-on-fx30/6992/1 "2026-01-26T11:36:03Z")

</div>

Hello,

I’m looking for a way to use Legato API to synchronize the system time using NTP, as mentioned here. However I’m encountering issues when trying to add the binding to this service, as it seems it is not running onto my FX30. Could someone provide an example as how to correctly sync time in a Legato 21 fx30 app ? Previous developer directly called `system("/usr/sbin/ntpd -dqnp pool.ntp.org")` but it doesn’t look very compliant to use system call to do that.

> **[Clock Service's Clock Sync Interface - Legato Docs](https://docs.legato.io/latest/c_le_clkSync.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 26, 2026, 2:26pm UTC](https://forum.legato.io/t/ntp-time-synchro-using-legato-api-on-fx30/6992/2 "2026-01-26T14:26:18Z")

</div>

What is the problem of using the system() call?

---

<div class="post-metadata">

**Author:** ![Nicolas.B](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nicolas.B](https://forum.legato.io/u/Nicolas.B)\
**Post date:** [January 26, 2026, 2:50pm UTC](https://forum.legato.io/t/ntp-time-synchro-using-legato-api-on-fx30/6992/3 "2026-01-26T14:50:30Z")

</div>

We usually prefer to use API or more standard function over calling OS specific function, even if here the target is predictable I do not consider it to be good practice in production environment.

As I found the API mentioned above I was thinking it was the “best practice” I was looking for but I might be wrong.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [January 26, 2026, 2:52pm UTC](https://forum.legato.io/t/ntp-time-synchro-using-legato-api-on-fx30/6992/4 "2026-01-26T14:52:45Z")

</div>

You can use udp with ntp server

> [@RC7620 network time incorrect by up to 2 minutes](https://forum.legato.io/t/rc7620-network-time-incorrect-by-up-to-2-minutes/6952/16):
>
> you can try UDP communication to NTP server and manually decode the NTP to update your +CCLK manually":

---

<div class="post-metadata">

**Author:** ![Nicolas.B](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nicolas.B](https://forum.legato.io/u/Nicolas.B)\
**Post date:** [January 26, 2026, 3:11pm UTC](https://forum.legato.io/t/ntp-time-synchro-using-legato-api-on-fx30/6992/5 "2026-01-26T15:11:12Z")

</div>

Thank you for your quick answers, I’ll look into that.
