WannesT
Posts: 3
Joined: Sun Nov 22, 2015 2:13 pm

NTP on raspberry

Tue May 09, 2017 5:44 pm

I'm building an application that collects data from sensors. Every x seconds, the data are send to my website, to store them in a mysql database.
I am now looking for a solution to send the correct date and time together with the data.
Can I realize this by regurarly sync a clock via ntp? How can this be done? I am using C# for my app.
Txs!

User avatar
DougieLawson
Posts: 36331
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: NTP on raspberry

Tue May 09, 2017 8:22 pm

Are you doing it with WinIoT or C# with Mono on Raspbian.

Raspbian has NTP built-in, no mucking about needed.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

WannesT
Posts: 3
Joined: Sun Nov 22, 2015 2:13 pm

Re: NTP on raspberry

Wed May 10, 2017 3:11 pm

hello, txs for the reply!
I am using win IOT indeed.

grz

asandford
Posts: 1997
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: NTP on raspberry

Wed May 10, 2017 11:14 pm

DougieLawson wrote: Raspbian has NTP built-in, no mucking about needed.
Which is somewhat different to Debian 8 (jessie) which doesn't, it uses systemd-timesyncd.

I don't wish to start a discussion on the relative merits of either, but find it odd that time sync is not borged into the systemd collective in Raspbian.

pauldy
Posts: 54
Joined: Tue Jun 12, 2012 3:34 pm

Re: NTP on raspberry

Wed May 10, 2017 11:46 pm

It should be built into win iot as well if it isn't working you might use power shell to see if you can ping the time servers or you can reset them using something like.

w32tm /config /syncfromflags:manual /manualpeerlist:”mytimeserver1 mytimeserver2"

Return to “Windows 10 for IoT”