<?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>RedHatVN Network &#187; date</title>
	<atom:link href="http://redhatvn.net/tag/date/feed" rel="self" type="application/rss+xml" />
	<link>http://redhatvn.net</link>
	<description>Shared Linux problems</description>
	<lastBuildDate>Tue, 07 Sep 2010 08:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Linux Set Date and Time From a Command Prompt</title>
		<link>http://redhatvn.net/linux-set-date-and-time-from-a-command-prompt</link>
		<comments>http://redhatvn.net/linux-set-date-and-time-from-a-command-prompt#comments</comments>
		<pubDate>Fri, 28 Aug 2009 06:55:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[date]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=275</guid>
		<description><![CDATA[Q. How can I set the system date and time from the command prompt (bash shell)? I don&#8217;t have GUI installed and I am login over ssh session. A. Use date command to display the current date and time or set the system date / time over ssh session. This is useful if the Linux [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;">Q.</span> How can I set the system date and time from the command prompt (bash shell)? I don&#8217;t have GUI installed and I am login over ssh session.</p>
<p><span style="color: #009900;">A. </span>Use date command to display the current date and time or set the system date / time over ssh session.</p>
<p><span id="more-275"></span></p>
<p>This is useful if the Linux server time and/or date is wrong, and you need to set it to new values from the shell prompt.</p>
<p>You must login as root user to use date command.</p>
<h2>Linux Set Date</h2>
<p>Use the following syntax to set new data and time:<br />
<strong>date set=&#8221;STRING&#8221;</strong></p>
<p>For example, set new data to 2 Oct 2006 18:00:00, type the following command as root user:<br />
<code># date -s "2 OCT 2006 18:00:00"</code><br />
OR<br />
<code># date set="2 OCT 2006 18:00:00"</code></p>
<p>You can also simplify format using following syntax:<br />
<code># date +%Y%m%d -s "20081128"</code></p>
<h3>Linux Set Time</h3>
<p>To set time use the following syntax:<br />
<code># date +%T -s "10:13:13"</code><br />
Where,</p>
<ul>
<li>10: Hour (hh)</li>
<li>13: Minute (mm)</li>
<li>30: Second  (ss)</li>
</ul>
<p>Use %p locale’s equivalent of either AM or PM, enter:<br />
<code># date +%T%p -s "6:10:30AM"<br />
# date +%T%p -s "12:10:30PM"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/linux-set-date-and-time-from-a-command-prompt/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->