http://www.ethernut.de/nutwiki/index.php?title=Caltime&feed=atom&action=historyCaltime - Revision history2024-03-28T10:45:06ZRevision history for this page on the wikiMediaWiki 1.26.2http://www.ethernut.de/nutwiki/index.php?title=Caltime&diff=38&oldid=prevHarald: 1 revision imported2016-10-27T16:02:52Z<p>1 revision imported</p>
<table class='diff diff-contentalign-left'>
<tr style='vertical-align: top;' lang='en'>
<td colspan='1' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='1' style="background-color: white; color:black; text-align: center;">Revision as of 16:02, 27 October 2016</td>
</tr><tr><td colspan='2' style='text-align: center;' lang='en'><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Haraldhttp://www.ethernut.de/nutwiki/index.php?title=Caltime&diff=37&oldid=prevHarald: /* Boards with RTC Hardware */2012-10-12T14:29:24Z<p><span dir="auto"><span class="autocomment">Boards with RTC Hardware</span></span></p>
<p><b>New page</b></p><div>== General Functions ==<br />
<br />
This sample demonstrate several time and date features provided by Nut/OS. Furthermore, it can be used to setup the RTC hardware on your board, if available.<br />
<br />
When started, the following output appears on the console.<br />
<br />
<pre><br />
Calendar Time 2.1 running on Nut/OS 5.0.5.0<br />
Opening line editor...OK<br />
Registering RTC hardware...OK<br />
<br />
0 - Display seconds counter<br />
1 - Display universal time<br />
2 - Display local time<br />
3 - Display system uptime<br />
C - Calculate weekday<br />
S - Set local time<br />
Y - Toggle DST calculation<br />
Z - Set timezone<br />
What is thy bidding, my master?<br />
</pre><br />
<br />
=== Setting Date and Time ===<br />
<br />
While Nut/OS internally uses [http://en.wikipedia.org/wiki/Universal_time universal time], caltime allows to enter the local time. Therefore, it is required to enter your local [http://en.wikipedia.org/wiki/Time_zone time zone] first.<br />
<br />
Press Z and enter the time deviation, given in hours and minutes offset to Greenwich Mean Time. By default it is set to +5:00 (Western America), for Central Europe set it to -1.<br />
<br />
<pre><br />
Enter time difference in format HH:MM: -1<br />
</pre><br />
<br />
Now press S to enter the current date and time in the requested format. The time must be entered in 24h format.<br />
<br />
<pre><br />
Enter date, use format YYYY/MM/DD : 2012/10/12<br />
Enter time, use 24h format HH:MM:SS: 16:22:30<br />
</pre><br />
<br />
== Boards with RTC Hardware ==<br />
<br />
On boards with RTC hardware, the following may be printed:<br />
<br />
<pre><br />
Registering RTC hardware...power failure<br />
</pre><br />
<br />
In this case, the RTC chip lost track of the date and time, probably caused by a failure of the backup power supply.<br />
<br />
You can fix this by manually setting the local time.<br />
<br />
== See also ==<br />
<br />
* [[Time and Date]]<br />
* [[Time Zones]]<br />
* [[RFC Date and Time Conversion]]<br />
* More [[Nut/OS Examples]]</div>Harald