<?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>Programmoholics Anonymous</title>
	<atom:link href="http://www.programmoholicsanonymous.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.programmoholicsanonymous.org</link>
	<description>.NET, MSSQL, BI, Android, Linux and Virtualization as an Addiction...</description>
	<lastBuildDate>Wed, 08 Jul 2009 03:31:46 +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>OpenVZ VPS wont let you change the date.</title>
		<link>http://www.programmoholicsanonymous.org/2009/07/openvz-vps-wont-let-you-change-the-date/</link>
		<comments>http://www.programmoholicsanonymous.org/2009/07/openvz-vps-wont-let-you-change-the-date/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 03:31:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenVZ]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Administration]]></category>

		<guid isPermaLink="false">http://www.programmoholicsanonymous.org/?p=498</guid>
		<description><![CDATA[I was preparing a backup script for my virtual servers and I realized that the date was 1 day ahead and intersting enough I could not change the date. # date -s &#34;7 JUL 2009&#34; date: cannot set date: Operation not permitted Tue Jul 7 00:00:00 EDT 2009 After some research it became clear that [...]]]></description>
			<content:encoded><![CDATA[<p>I was preparing a backup script for my virtual servers and I realized that the date was 1 day ahead and intersting enough I could not change the date.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># date -s &quot;7 JUL 2009&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">date</span>: cannot <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #c20cb9; font-weight: bold;">date</span>: Operation not permitted
Tue Jul  <span style="color: #000000;">7</span> 00:00:00 EDT <span style="color: #000000;">2009</span></pre></div></div>

<p>After some research it became clear that OpenVZ did not want me to change the date of the VPS and this did not have to do with your Host server datetime. </p>
<p>So, long story short, quick solution.</p>
<p>Change your VPS time zone and all will be fine.</p>
<p>Backup your current time file</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime.backup</pre></div></div>

<p>Create a new symbolic link to your current timezone (server&#8217;s timezone)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>Country<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>Area<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>localtime</pre></div></div>

<p>You can get  a better idea of which time zones are available by listing the content of this folder and follow the path.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>zoneinfo</pre></div></div>

<p>enjoy&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.programmoholicsanonymous.org/2009/07/openvz-vps-wont-let-you-change-the-date/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
