<div>I tried solving this problem as follows. Don&#39;t know if its the best solution, but works for me as my application is meant only for Intranet environments. </div>
<div>&nbsp;</div>
<ul>
<li>I subclassed <font size="2">zope.app.container.browser.contents.</font><font size="2">Contents.</font></li>
<li><font size="2">In the subclass I overrided _<font size="2"><strong>extractContentInfo </strong>method</font></font></li>
<li><font size="2">Created a <font size="2">LocalTimezone class as described in Python manual by subclassing tzinfo</font></font></li>
<li><font size="2">Converted the created and modifed datetime objects from dublin-core information to local time zone</font></li>
<li><font size="2">Used this class to create the Container views</font></li></ul>
<div>The time information looks now fine for me. </div>
<div>&nbsp;</div>
<div>Is there any better way? </div>
<div>&nbsp;</div>
<div>With regards,</div>
<div>-Shailesh</div>
<div><br>&nbsp;</div>
<div><span class="gmail_quote">On 1/15/07, <b class="gmail_sendername">Shailesh Kumar</b> &lt;<a href="mailto:shaileshk@gmail.com">shaileshk@gmail.com</a>&gt; wrote:</span></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Sorry, the mail went only to Philipp by mistake. 
<div><span class="e" id="q_11026359cf27cec7_1"><br><br>
<div>Hi Philipp, </div>
<div>Thanx for the pointers. I went through the sections of your book regarding this. I guess I now understand my problem better. The problem is about the time-zone and not about formatting. The Creation and Modification time stamps seem to be the UTC time stamps, and I want the display to be according to local time zone. 
</div>
<div>&nbsp;</div>
<div>How can I do it? </div>
<div>&nbsp;</div>
<div>With regards,</div><span>
<div>-Shailesh</div></span>
<div><span>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 1/14/07, <b class="gmail_sendername">Philipp von Weitershausen</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:philipp@weitershausen.de" target="_blank">philipp@weitershausen.de 
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br><br>Shailesh Kumar wrote:<br>&gt; Hi,<br>&gt;<br>&gt; When I look at the Creation time and Modification time in any of the 
<br>&gt; container views, it shows me the UTC time.<br>&gt;<br>&gt; Looking at<br>&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://zope.app.container.browser.contents.py/" target="_blank">zope.app.container.browser.contents.py 
</a><br>&gt; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://zope.app.container.browser.contents.py/" target="_blank"> http://zope.app.container.browser.contents.py</a>&gt;: Line 174<br>&gt;<br>
&gt; I found that:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; formatter = self.request.locale.dates.getFormatter(<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;dateTime&#39;, &#39;short&#39;) <br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; created = self.safe_getattr(dc, &#39;created&#39;, None) 
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if created is not None:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; info[&#39;created&#39;] = formatter.format(created)<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; modified = self.safe_getattr(dc, &#39;modified&#39;, None)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if modified is not None: 
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; info[&#39;modified&#39;] = formatter.format(modified)<br>&gt;<br>&gt; is being used to compute them.<br><br>No, the local formatter is used to *format* dates according to the<br>current locale. 8th of March this year, for example would be &quot;3/8/2007&quot; 
<br>in the U.S. English locale, but &quot;08.03.2007&quot; in the German locale. <br><br>&gt; I am puzzled, how does the browser set its locale? I guess this must be<br>&gt; a very basic question. But I am not able to figure it out. 
<br><br>request.locale is set according to the most preferred language/locale <br>returned by the IUserPreferredLanguages adapter for the request. The<br>default adapter reads browser&#39;s the Accept-Language header. More 
<br>advanced adapters could use cookies or something else that the user can<br>influence though the website directly.<br><br>My book talks about this in detail: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://worldcookery.com/" target="_blank">
http://worldcookery.com</a><br><br><br>--<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://worldcookery.com/" target="_blank">http://worldcookery.com</a> -- Professional Zope documentation and training 
<br>2nd edition of Web Component Development with Zope 3 is now shipping!<br><br></blockquote></div><br></span></div></span></div></blockquote><br>