<?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>Handling iso datetime in nrf52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28702/handling-iso-datetime-in-nrf52</link><description>I am using nrf52832 chip. I will be receiving time in isoFormat. 
 I am wondering how convert the iso format to get the date and time in my C program. 
 I am not using any RTOS but doing everything on baremetal.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Dec 2017 09:31:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28702/handling-iso-datetime-in-nrf52" /><item><title>RE: Handling iso datetime in nrf52</title><link>https://devzone.nordicsemi.com/thread/113758?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2017 09:31:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee2f95b9-70a8-4afd-a9b8-5bf54a15ea4f</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Have you tried the &lt;em&gt;Current Time Service&lt;/em&gt; client example in the nRF5 SDK?&lt;/p&gt;
&lt;p&gt;The current time service is designed to allow a BLE peripheral to get an accurate date and time from a BLE central (typically a phone).&lt;/p&gt;
&lt;p&gt;I think you need to run some code on the Android side to support it. Some quick googling yielded this example:&lt;br /&gt;
&lt;a href="https://github.com/RideBeeline/android-bluetooth-current-time-service"&gt;https://github.com/RideBeeline/android-bluetooth-current-time-service&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t tested it myself, but maybe you can get it working :)&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling iso datetime in nrf52</title><link>https://devzone.nordicsemi.com/thread/113757?ContentTypeID=1</link><pubDate>Tue, 26 Dec 2017 05:12:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:627e3e1b-cec8-42b1-94d0-96727080d5fc</guid><dc:creator>Tharun</dc:creator><description>&lt;p&gt;@Torbjørn Is there a android library which will take a calendar and which will send the data to the BLE?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Handling iso datetime in nrf52</title><link>https://devzone.nordicsemi.com/thread/113756?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 12:40:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c69a2203-ab03-4121-a185-9dc31367d67e</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;So essentially you are getting a string with the date and time in ISO format?&lt;/p&gt;
&lt;p&gt;I made a &lt;a href="https://github.com/NordicPlayground/nrf5-calendar-example"&gt;small example&lt;/a&gt; earlier showing how to use the time.h library on the nRF52DK, but the time.h library doesn&amp;#39;t have a function for converting a string into a time object (only the opposite).&lt;/p&gt;
&lt;p&gt;The following thread shows a way to use sscanf(..) to break down a date/time string into sub components, together with the date/time struct defined in time.h. You should be able to combine that example with the code I shared earlier:&lt;br /&gt;
&lt;a href="https://cboard.cprogramming.com/c-programming/169114-how-convert-string-time_t.html"&gt;https://cboard.cprogramming.com/c-programming/169114-how-convert-string-time_t.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>