Sorry, the mail went only to Philipp by mistake. <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> </div>
<div>How can I do it? </div>
<div> </div>
<div>With regards,</div><span class="sg">
<div>-Shailesh</div></span>
<div><span class="e" id="q_110263428a03a7ac_2">
<div><br><br> </div>
<div><span class="gmail_quote">On 1/14/07, <b class="gmail_sendername">Philipp von Weitershausen</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:philipp@weitershausen.de" target="_blank">philipp@weitershausen.de
</a>> 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>> Hi,<br>><br>> When I look at the Creation time and Modification time in any of the
<br>> container views, it shows me the UTC time.<br>><br>> Looking at<br>> <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>> <<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>>: Line 174<br>><br>
> I found that:<br>><br>> formatter = self.request.locale.dates.getFormatter(<br>> 'dateTime', 'short') <br>><br>> created = self.safe_getattr(dc, 'created', None)
<br>> if created is not None:<br>> info['created'] = formatter.format(created)<br>><br>> modified = self.safe_getattr(dc, 'modified', None)<br>> if modified is not None:
<br>> info['modified'] = formatter.format(modified)<br>><br>> 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 "3/8/2007"
<br>in the U.S. English locale, but "08.03.2007" in the German locale. <br><br>> I am puzzled, how does the browser set its locale? I guess this must be<br>> 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'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>