# NTP Sync not Syncing?

**URL:** <https://forums.balena.io/t/ntp-sync-not-syncing/1851>\
**Category:** Product support\
**Created:** [September 17, 2017, 12:16pm UTC](https://forums.balena.io/t/ntp-sync-not-syncing/1851 "2017-09-17T12:16:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kumerachips](https://avatars.discourse-cdn.com/v4/letter/k/cab0a1/32.png) [@kumerachips](https://forums.balena.io/u/kumerachips)\
**Post date:** [September 17, 2017, 12:16pm UTC](https://forums.balena.io/t/ntp-sync-not-syncing/1851/1 "2017-09-17T12:16:17Z")

</div>

Hi All,

I’m having a little difficulty with time sync. I realize it occurs in the host OS [https://docs.resin.io/runtime/time/](https://docs.resin.io/runtime/time/), but even though I’m setting the timezone (my application needs correct local time), the OS clock isn’t syncing. I’ve tried the dbus-send to systemd, that just confirms that it hasn’t sync’d.

The time on the device log files is a weird portion of an hour out of sync, not a nice multiple of hours as I would see with a simple TZ error.

Is there a way to see what problems the host OS is having with Sync?

Specifics:  
Raspberry Pi Zero W  
Pimoroni InkyPhat card  
ResinOS: Resin OS 2.2.0+rev1  
Local Wifi NATd, and connecting fine to [Resin.IO](http://Resin.IO) dashboard.  
Docker image: resin/rpi-raspbian

---

<div class="post-metadata">

**Author:** ![willnewton](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@willnewton](https://forums.balena.io/u/willnewton)\
**Post date:** [September 19, 2017, 6:46am UTC](https://forums.balena.io/t/ntp-sync-not-syncing/1851/3 "2017-09-19T06:46:00Z")

</div>

Typically this issue is caused by problems accessing NTP servers on UDP port 123. Is this port being blocked by your firewall?

---

<div class="post-metadata">

**Author:** ![kumerachips](https://avatars.discourse-cdn.com/v4/letter/k/cab0a1/32.png) [@kumerachips](https://forums.balena.io/u/kumerachips)\
**Post date:** [September 20, 2017, 3:11am UTC](https://forums.balena.io/t/ntp-sync-not-syncing/1851/4 "2017-09-20T03:11:42Z")

</div>

No, other Windows 10 PC and Ubuntu VM’s update ok. [`[https://www.cs.cmu.edu/~help/networking/ntp.html](https://www.cs.cmu.edu/~help/networking/ntp.html)`].

**edit.** Installed ntpdate in the container and it runs and syncs fine from the terminal.

```
root@b92e483:/app# ntpdate time1.google.com
20 Sep 23:50:24 ntpdate[313]: step time server 216.239.35.0 offset 4684686.221160 sec
root@b92e483:/app# ntpdate time1.google.com
20 Sep 23:50:39 ntpdate[314]: adjust time server 216.239.35.0 offset 0.001058 sec
root@b92e483:/app#
```

---

<div class="post-metadata">

**Author:** ![willnewton](https://avatars.discourse-cdn.com/v4/letter/w/e9c0ed/32.png) [@willnewton](https://forums.balena.io/u/willnewton)\
**Post date:** [September 20, 2017, 12:11pm UTC](https://forums.balena.io/t/ntp-sync-not-syncing/1851/5 "2017-09-20T12:11:02Z")

</div>

By default resinOS uses e.g. [0.resinio.pool.ntp.org](http://0.resinio.pool.ntp.org) can you successfully synchronize to that server?

---

<div class="post-metadata">

**Author:** ![kumerachips](https://avatars.discourse-cdn.com/v4/letter/k/cab0a1/32.png) [@kumerachips](https://forums.balena.io/u/kumerachips)\
**Post date:** [September 20, 2017, 8:54pm UTC](https://forums.balena.io/t/ntp-sync-not-syncing/1851/6 "2017-09-20T20:54:27Z")

</div>

Yes, it syncs with that server using ntpdate, just doesn’t work at start.  
Interestingly, the local time inside the container is set, but cron remains in UTC.

**EDIT:** Some more useful info here: [Tricks and Traps, Cron in containers](http://dev.im-bot.com/docker-cron/)
