<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to use Time and Date in C</title>
	<atom:link href="http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c</link>
	<description>CodingUnit is your online resource for learning to program. Tutorials on C, C++, PHP, Python, MySQL, Java, JQuery, Opengl, DirectX and much more!</description>
	<lastBuildDate>Mon, 06 Feb 2012 06:08:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: sudheera</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-4435</link>
		<dc:creator>sudheera</dc:creator>
		<pubDate>Wed, 25 Jan 2012 07:32:50 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-4435</guid>
		<description>how do i compile this... enyone  send me a complie code</description>
		<content:encoded><![CDATA[<p>how do i compile this&#8230; enyone  send me a complie code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: munisai</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-4373</link>
		<dc:creator>munisai</dc:creator>
		<pubDate>Mon, 26 Dec 2011 15:00:28 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-4373</guid>
		<description>it is really interesting.can i count the time in c that is 24hrs and after 24 hrs.A day will be incremented like that....</description>
		<content:encoded><![CDATA[<p>it is really interesting.can i count the time in c that is 24hrs and after 24 hrs.A day will be incremented like that&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Ibbetson</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-4337</link>
		<dc:creator>Andrew Ibbetson</dc:creator>
		<pubDate>Tue, 06 Dec 2011 12:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-4337</guid>
		<description>I&#039;m currently using a combination of boland C++, ARCOM pc104 card running DOS 6.22.
Within my program i have the following:-

putenv(&quot;TZ=PST8PD7&quot;);
tzset();

i have also tried

putenv(&quot;TZ=PST8PD7,M4.1.0/2,M11.1.0/2&quot;);
tzset();

In each case i use the localtime() function to extract the time data and display, this process seems to work fine for the zone time differrence e.g 8 hours, however the daylight saving is completely ignored. tm_isddt does indicate when daylight is in effect although this always happens at same UK start and stop time irrespective of any changes i make.
question: How do i get the time to change according to specified daylight saving start, stop dates and daylight saving time differences.

Many thanks in anticipation.

Andy</description>
		<content:encoded><![CDATA[<p>I&#8217;m currently using a combination of boland C++, ARCOM pc104 card running DOS 6.22.<br />
Within my program i have the following:-</p>
<p>putenv(&#8220;TZ=PST8PD7&#8243;);<br />
tzset();</p>
<p>i have also tried</p>
<p>putenv(&#8220;TZ=PST8PD7,M4.1.0/2,M11.1.0/2&#8243;);<br />
tzset();</p>
<p>In each case i use the localtime() function to extract the time data and display, this process seems to work fine for the zone time differrence e.g 8 hours, however the daylight saving is completely ignored. tm_isddt does indicate when daylight is in effect although this always happens at same UK start and stop time irrespective of any changes i make.<br />
question: How do i get the time to change according to specified daylight saving start, stop dates and daylight saving time differences.</p>
<p>Many thanks in anticipation.</p>
<p>Andy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bindi</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-4324</link>
		<dc:creator>Bindi</dc:creator>
		<pubDate>Fri, 02 Dec 2011 03:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-4324</guid>
		<description>hello,i want to compare system date with another date(whole date like dd-mm-yyyy not only date)
Have you any solution for this?
Thanks in advance</description>
		<content:encoded><![CDATA[<p>hello,i want to compare system date with another date(whole date like dd-mm-yyyy not only date)<br />
Have you any solution for this?<br />
Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anshuman</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-4319</link>
		<dc:creator>Anshuman</dc:creator>
		<pubDate>Thu, 01 Dec 2011 17:53:51 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-4319</guid>
		<description>is it possible to calculate execution time in milliseconds or nanoseconds?how?</description>
		<content:encoded><![CDATA[<p>is it possible to calculate execution time in milliseconds or nanoseconds?how?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chithra</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-4309</link>
		<dc:creator>chithra</dc:creator>
		<pubDate>Wed, 30 Nov 2011 13:26:42 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-4309</guid>
		<description>hi sir,
    Can i have the program for real time clock...
The clock must run continuously like a wall clock...
plz send me..

thank you.</description>
		<content:encoded><![CDATA[<p>hi sir,<br />
    Can i have the program for real time clock&#8230;<br />
The clock must run continuously like a wall clock&#8230;<br />
plz send me..</p>
<p>thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flipps</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-4222</link>
		<dc:creator>flipps</dc:creator>
		<pubDate>Fri, 18 Nov 2011 11:09:52 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-4222</guid>
		<description>Ok, figured it - if you set tm_isdst to a value that isn&#039;t you&#039;re actual daylight saving, it corrects it and adjusts the hour appropriately!</description>
		<content:encoded><![CDATA[<p>Ok, figured it &#8211; if you set tm_isdst to a value that isn&#8217;t you&#8217;re actual daylight saving, it corrects it and adjusts the hour appropriately!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flipps</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-4221</link>
		<dc:creator>flipps</dc:creator>
		<pubDate>Fri, 18 Nov 2011 09:53:20 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-4221</guid>
		<description>Hi, thanks for this useful article.
Tried the following snippet - after mktime() returns, it increments .tm_hour &amp; .tm_isdst - is there any reason for this, doesn&#039;t alter the others? Could be a bit of a minefield programming the difference before and after a mktime() call...
=====

    
    str_time.tm_year = 2012-1900;
    str_time.tm_mon = 6;
    str_time.tm_mday = 5;
    str_time.tm_hour = 10;
    str_time.tm_min = 3;
    str_time.tm_sec = 5;
    str_time.tm_isdst = 0;
    
    printf(&quot;Start time year = %u\n&quot;, str_time.tm_year);
    printf(&quot;Start time mon = %u\n&quot;, str_time.tm_mon);
    printf(&quot;Start time mday = %u\n&quot;, str_time.tm_mday);
    printf(&quot;Start time hour = %u\n&quot;, str_time.tm_hour);
    printf(&quot;Start time min = %u\n&quot;, str_time.tm_min);
    printf(&quot;Start time sec = %u\n&quot;, str_time.tm_sec);
    printf(&quot;Start time isdst = %u\n&quot;, str_time.tm_isdst);
    time_of_day = mktime(&amp;str_time);
    printf(&quot;Start time year = %u\n&quot;, str_time.tm_year);
    printf(&quot;Start time mon = %u\n&quot;, str_time.tm_mon);
    printf(&quot;Start time mday = %u\n&quot;, str_time.tm_mday);
    printf(&quot;Start time hour = %u\n&quot;, str_time.tm_hour);
    printf(&quot;Start time min = %u\n&quot;, str_time.tm_min);
    printf(&quot;Start time sec = %u\n&quot;, str_time.tm_sec);
    printf(&quot;Start time isdst = %u\n&quot;, str_time.tm_isdst);
    printf(&quot;Start time hour = %u\n&quot;, str_time.tm_hour);
    printf(&quot;%s&quot;, ctime(&amp;time_of_day));</description>
		<content:encoded><![CDATA[<p>Hi, thanks for this useful article.<br />
Tried the following snippet &#8211; after mktime() returns, it increments .tm_hour &amp; .tm_isdst &#8211; is there any reason for this, doesn&#8217;t alter the others? Could be a bit of a minefield programming the difference before and after a mktime() call&#8230;<br />
=====</p>
<p>    str_time.tm_year = 2012-1900;<br />
    str_time.tm_mon = 6;<br />
    str_time.tm_mday = 5;<br />
    str_time.tm_hour = 10;<br />
    str_time.tm_min = 3;<br />
    str_time.tm_sec = 5;<br />
    str_time.tm_isdst = 0;</p>
<p>    printf(&#8220;Start time year = %u\n&#8221;, str_time.tm_year);<br />
    printf(&#8220;Start time mon = %u\n&#8221;, str_time.tm_mon);<br />
    printf(&#8220;Start time mday = %u\n&#8221;, str_time.tm_mday);<br />
    printf(&#8220;Start time hour = %u\n&#8221;, str_time.tm_hour);<br />
    printf(&#8220;Start time min = %u\n&#8221;, str_time.tm_min);<br />
    printf(&#8220;Start time sec = %u\n&#8221;, str_time.tm_sec);<br />
    printf(&#8220;Start time isdst = %u\n&#8221;, str_time.tm_isdst);<br />
    time_of_day = mktime(&amp;str_time);<br />
    printf(&#8220;Start time year = %u\n&#8221;, str_time.tm_year);<br />
    printf(&#8220;Start time mon = %u\n&#8221;, str_time.tm_mon);<br />
    printf(&#8220;Start time mday = %u\n&#8221;, str_time.tm_mday);<br />
    printf(&#8220;Start time hour = %u\n&#8221;, str_time.tm_hour);<br />
    printf(&#8220;Start time min = %u\n&#8221;, str_time.tm_min);<br />
    printf(&#8220;Start time sec = %u\n&#8221;, str_time.tm_sec);<br />
    printf(&#8220;Start time isdst = %u\n&#8221;, str_time.tm_isdst);<br />
    printf(&#8220;Start time hour = %u\n&#8221;, str_time.tm_hour);<br />
    printf(&#8220;%s&#8221;, ctime(&amp;time_of_day));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-3724</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 23 Aug 2011 05:24:13 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-3724</guid>
		<description>Don&#039;t use the methods used on this page for high resolution timing en never use wait() function (because it blocks), but instead take a look at the functions sleep() and usleep(). For delays of multiple seconds, your best bet is probably to use sleep(). For delays of at least tens of milliseconds (about 10 ms seems to be the minimum delay), usleep() should work. These functions give the CPU to other processes (``sleep&#039;&#039;), so CPU time isn&#039;t wasted. See the manual pages sleep(3) and usleep(3) for details. But be careful with such small time delays, because they can&#039;t behave different on different operating systems.

Take a look at this &lt;a href=&quot;http://tldp.org/HOWTO/IO-Port-Programming-4.html&quot; rel=&quot;nofollow&quot;&gt;page&lt;/a&gt; that has more about high resolution timing on Linux.

Hope it helps!</description>
		<content:encoded><![CDATA[<p>Don&#8217;t use the methods used on this page for high resolution timing en never use wait() function (because it blocks), but instead take a look at the functions sleep() and usleep(). For delays of multiple seconds, your best bet is probably to use sleep(). For delays of at least tens of milliseconds (about 10 ms seems to be the minimum delay), usleep() should work. These functions give the CPU to other processes (&#8220;sleep&#8221;), so CPU time isn&#8217;t wasted. See the manual pages sleep(3) and usleep(3) for details. But be careful with such small time delays, because they can&#8217;t behave different on different operating systems.</p>
<p>Take a look at this <a href="http://tldp.org/HOWTO/IO-Port-Programming-4.html" rel="nofollow">page</a> that has more about high resolution timing on Linux.</p>
<p>Hope it helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: usha</title>
		<link>http://www.codingunit.com/c-tutorial-how-to-use-time-and-date-in-c/comment-page-1#comment-3723</link>
		<dc:creator>usha</dc:creator>
		<pubDate>Tue, 23 Aug 2011 04:28:51 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/?p=228#comment-3723</guid>
		<description>How to wait for milli seconds?</description>
		<content:encoded><![CDATA[<p>How to wait for milli seconds?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

