<?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>NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48619/nrf9160---time-h-source-file</link><description>Hi, I am working with nrf9160 and I am trying to get unix time in a user-readable form. I found this code online that helps me do that ( github.com/.../main.c) but the header file &amp;lt;time.h&amp;gt; on zephyr was empty. Can someone help me with the source file</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Nov 2020 21:33:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48619/nrf9160---time-h-source-file" /><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/278860?ContentTypeID=1</link><pubDate>Fri, 06 Nov 2020 21:33:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b72bacf6-f8cb-4bcd-9230-c1f13680c654</guid><dc:creator>manikandan</dc:creator><description>&lt;p&gt;can u explain this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/203532?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2019 10:50:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4adbb1c8-f474-4157-aa02-762d83e43863</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Did you try using newlib C with time_t and ctime()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/200566?ContentTypeID=1</link><pubDate>Thu, 25 Jul 2019 14:01:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33049b16-6b0c-483f-b35b-89142d07bae3</guid><dc:creator>RonanB96</dc:creator><description>&lt;p&gt;Any updates on this? Trying to set AT+CCLK using unix time from ntp server&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/193449?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 13:20:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ed806bf-b38f-4671-8374-093f770a6954</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;In your prj.conf, you need to add &lt;a href="https://docs.zephyrproject.org/1.13.0/subsystems/c_library.html"&gt;CONFIG_NEWLIB_LIBC=y&lt;/a&gt;&amp;nbsp;as &lt;a href="https://devzone.nordicsemi.com/members/rkguy"&gt;rkguy&lt;/a&gt; mentions.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/rkguy"&gt;rkguy&lt;/a&gt;, can you please open a new case for your query? This to keep track of the topic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/193379?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 10:32:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f0c3b96-a495-40af-b63f-b5b593574f16</guid><dc:creator>rkguy</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/sc_5f00_coding"&gt;sc_coding&lt;/a&gt;&amp;nbsp;I looked st the ecobee you provided. Did you also use the config newlib switch in the top of this file?&amp;nbsp;&lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/ntp/prj.conf"&gt;github.com/.../prj.conf&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/193377?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 10:28:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27bee6b7-d416-4b55-a8c3-63992bb3cdc1</guid><dc:creator>rkguy</dc:creator><description>&lt;p&gt;I may try turning it on in the config file and then importing time.h&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/43631/using-math-h-on-nrf9160/170777#170777&amp;nbsp;"&gt;devzone.nordicsemi.com/.../170777&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/193375?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 10:21:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d17f95a4-9aa7-4609-ae6a-376762c06de3</guid><dc:creator>rkguy</dc:creator><description>&lt;p&gt;Maybe we need to do something like this config_newlib_libc&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/1.13.0/subsystems/c_library.html"&gt;docs.zephyrproject.org/.../c_library.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/193374?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 10:17:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fa9ab21-c837-47ed-bd8d-bb4975eb1cf1</guid><dc:creator>rkguy</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/oyvind-schei"&gt;Øyvind&lt;/a&gt;do we have to enable newlib somehow to get access to functions like strftime ? Confusing thread here&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/3102"&gt;github.com/.../3102&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/193371?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 10:09:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:999349e6-9c75-4422-8082-dcc21db81370</guid><dc:creator>rkguy</dc:creator><description>&lt;p&gt;They&amp;#39;re is an example here starting at line 45 but I can&amp;#39;t get it to work&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/master/samples/net/google_iot_mqtt/src/main.c"&gt;github.com/.../main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/193368?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 10:05:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ef2ccd6-e070-4678-82e8-eb6dbe070cbf</guid><dc:creator>rkguy</dc:creator><description>&lt;p&gt;I am looking for something like strftime&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/193365?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2019 09:55:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a353647e-9019-4eaf-8461-83ee06176789</guid><dc:creator>rkguy</dc:creator><description>&lt;ul&gt;
&lt;li&gt;I am also interested in this &lt;a href="https://devzone.nordicsemi.com/members/oyvind-schei"&gt;Øyvind&lt;/a&gt; Are there proper zephyr methods for manipulating time?&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/193245?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 15:59:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fccf5b24-02b3-4c1c-b8fd-d8954a035181</guid><dc:creator>sc_coding</dc:creator><description>&lt;p&gt;I&amp;#39;m using version 0.4.0. The time.h file that I&amp;#39;m referring to is at&amp;nbsp;&amp;quot;ncs\zephyr\lib\libc\minimal\include\time.h&amp;quot;. It&amp;#39;s on github (&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/master/lib/libc/minimal/include/time.h"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/master/lib/libc/minimal/include/time.h&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Fundamentally what we want to do is take a unix time and convert is to the format used for the modem. As required here&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/pdf/nrf91_at_commands_v0.9.1.pdf"&gt;https://infocenter.nordicsemi.com/pdf/nrf91_at_commands_v0.9.1.pdf,&lt;/a&gt;&amp;nbsp;the format needs to be changed to this &amp;quot;yy/MM/dd,hh:mm:ss&amp;plusmn;zz&amp;quot;. What is your recommendation for the best method to do this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160 - time.h source file?</title><link>https://devzone.nordicsemi.com/thread/192983?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2019 19:41:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00dd0332-ccdd-44a0-8407-01c604b4179b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can you provide some more information? What version of NCS are you running? Have a look at the &lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/getting-started-with-nrf9160-dk"&gt;Getting Started Guide&lt;/a&gt; and the&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/nrf-connect-sdk-tutorial"&gt;nRF Connect SDK Tutorial&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>