<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Get and sync timestamps with other measurements</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64992/get-and-sync-timestamps-with-other-measurements</link><description>I would like to get timestamps with ms accuracy in order to compare it with power measurements taken simultaneously. The +CCLK command accuracy is in seconds and there are several hours difference from local time. What is the best approach to synchronize</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Aug 2020 14:13:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64992/get-and-sync-timestamps-with-other-measurements" /><item><title>RE: Get and sync timestamps with other measurements</title><link>https://devzone.nordicsemi.com/thread/265589?ContentTypeID=1</link><pubDate>Thu, 20 Aug 2020 14:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f1dc5f3-bf33-4a9d-a8b4-b5a6a833c999</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You could use the +CCLK, and set it to your timezone, as shown here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/support-private/support/248370#permalink=555740"&gt;https://devzone.nordicsemi.com/support-private/support/248370#permalink=555740&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]What is the best approach to synchronize timestamps for example from an NTP server and get the timestamp with ms accuracy?[/quote]
&lt;p&gt;You can use the sntp library in zephyr for this, however; it does have a latency per the network transaction (UDP send request and receive from server).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>