<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux, Programming, Telephony, Asterisk, Apache, Tips &#38; Tricks &#187; date</title>
	<atom:link href="http://shahidz.com/tag/date/feed/" rel="self" type="application/rss+xml" />
	<link>http://shahidz.com</link>
	<description>Passionate About Technology</description>
	<lastBuildDate>Wed, 18 Aug 2010 07:03:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Linux Date Command Option</title>
		<link>http://shahidz.com/linux-date-command-option/</link>
		<comments>http://shahidz.com/linux-date-command-option/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 05:59:13 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[option]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=77</guid>
		<description><![CDATA[Date command options.
Date command to get the current date.
$ date=$(date +%Y-%m-%d)
$ echo $date
Date command to get yesterday&#8217;s date.
$ date=$(date --date=yesterday +%Y-%m-%d)
$ echo $date
Date command to get tomorrow&#8217;s date.
$ date=$(date --date=tomorrow +%Y-%m-%d)
$ echo $date
Performing arithmetical operations on date.
Below example will subtract 1 hour from the current date time.
$ strdate=`date --date=now +"%s"`
$ strdate=`expr $strdate - 3600`
$ date=`date -d "1970-01-01 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Date command options.</strong></p>
<p>Date command to get the current date.</p>
<pre>$ date=$(date +%Y-%m-%d)
$ echo $date</pre>
<p>Date command to get yesterday&#8217;s date.</p>
<pre>$ date=$(date --date=yesterday +%Y-%m-%d)
$ echo $date</pre>
<p>Date command to get tomorrow&#8217;s date.</p>
<pre>$ date=$(date --date=tomorrow +%Y-%m-%d)
$ echo $date</pre>
<p>Performing arithmetical operations on date.</p>
<p>Below example will subtract 1 hour from the current date time.</p>
<pre>$ strdate=`date --date=now +"%s"`
$ strdate=`expr $strdate - 3600`
$ date=`date -d "1970-01-01 $strdate sec" +"%a %b %d %H:%M"`</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Flinux-date-command-option%2F&amp;linkname=Linux%20Date%20Command%20Option"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/linux-date-command-option/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to synchronize the System Times</title>
		<link>http://shahidz.com/how-to-synchronize-the-time-of-a-system/</link>
		<comments>http://shahidz.com/how-to-synchronize-the-time-of-a-system/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 18:51:14 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[clock]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[ntpdate-debian]]></category>
		<category><![CDATA[openntpd]]></category>
		<category><![CDATA[synchronize]]></category>

		<guid isPermaLink="false">http://shahidz.com/how-to-synchronize-the-time-of-a-system/</guid>
		<description><![CDATA[Introduction
OpenNTPD is a Unix system daemon implementing the Network Time Protocol to synchronize the local clock of a computer system with remote NTP servers.
OpenNTPD is primarily developed by Henning Brauer as part of the OpenBSD project. Its design goals include being secure (non-exploitable), easy to configure, accurate enough for most purposes and with source code [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p><a href="http://www.openntpd.org/" title="http://www.openntpd.org/"><em>OpenNTPD</em></a> is a Unix system daemon implementing the Network Time Protocol to synchronize the local clock of a computer system with remote NTP servers.</p>
<p>OpenNTPD is primarily developed by <a href="http://en.wikipedia.org/w/index.php?title=Henning_Brauer&amp;action=edit&amp;redlink=1" class="new" title="Henning Brauer (page does not exist)">Henning Brauer</a> as part of the <a href="http://en.wikipedia.org/wiki/OpenBSD" title="OpenBSD">OpenBSD</a> project. Its design goals include being secure (<a href="http://en.wikipedia.org/wiki/Exploit_%28computer_security%29" title="Exploit (computer security)">non-exploitable</a>), easy to configure, accurate enough for most purposes and with <a href="http://en.wikipedia.org/wiki/Source_code" title="Source code">source code</a> that can be distributed under a <a href="http://en.wikipedia.org/wiki/BSD_license" class="mw-redirect" title="BSD license">BSD license</a>.</p>
<p>This tool helped me a lot. Using openntpd we can set the same time on multiple system.</p>
<h3>Installation</h3>
<pre>$ sudo apt-get install openntpd</pre>
<p>Openntp configuration file /etc/openntpd/ntpd.conf</p>
<p>To set the time use the command <strong>ntpdate-debian</strong></p>
<pre>$ sudo ntpdate-debian
[sudo] password for shahid:
 7 Aug 00:20:33 ntpdate[26597]: adjust time server 59.165.131.82 offset -0.089443 sec</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fhow-to-synchronize-the-time-of-a-system%2F&amp;linkname=How%20to%20synchronize%20the%20System%20Times"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/how-to-synchronize-the-time-of-a-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
