<?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>Calendar in the nRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85038/calendar-in-the-nrf5340</link><description>If I can get time through WiFi then send it to the nRF5340 and place it in a Struct TM. is there any method to have the nRF5340 maintain the time/calendar from that initial setting and only use WiFi to periodically keep the time sync. is there a time</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Mar 2022 15:41:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85038/calendar-in-the-nrf5340" /><item><title>RE: Calendar in the nRF5340</title><link>https://devzone.nordicsemi.com/thread/355631?ContentTypeID=1</link><pubDate>Tue, 01 Mar 2022 15:41:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13ebc670-4ca1-4645-8211-cb79d4b26aa8</guid><dc:creator>WesC</dc:creator><description>&lt;p&gt;thanks for the help.&amp;nbsp; He also needed to add&amp;nbsp;CONFIG_POSIX_CLOCK=y to the prj.conf&amp;nbsp; and time.h and posix_time.h were working&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calendar in the nRF5340</title><link>https://devzone.nordicsemi.com/thread/354649?ContentTypeID=1</link><pubDate>Wed, 23 Feb 2022 15:09:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4a3cbb6-6f5a-414f-bb06-d559c4288742</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The simplest solution would be to store the time received over WiFi along with the uptime of the system at that time, and use the delta between that uptime and the current uptime to get the current time. This seems to be implemented in the POSIX &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1/lib/posix/clock.c#L82"&gt;clock_settime&lt;/a&gt;&lt;span&gt;()/&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.7.99-ncs1/lib/posix/clock.c#L28"&gt;clock_gettime&lt;/a&gt;() functions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can find an example of using this functionality&amp;nbsp;in this example:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;&lt;a href="https://github.com/too1/ncs-nrf5-cam-tl-controller/blob/master/src/main.c#L293-L303"&gt;https://github.com/too1/ncs-nrf5-cam-tl-controller/blob/master/src/main.c#L293-L303&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;a href="https://github.com/too1/ncs-nrf5-cam-tl-controller/blob/master/src/main.c#L396-L397"&gt;https://github.com/too1/ncs-nrf5-cam-tl-controller/blob/master/src/main.c#L396-L397&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Jørgen&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>