[Zope3-Users] question about request.locale and creation time

Shailesh Kumar shaileshk at gmail.com
Sat Jan 13 11:35:42 EST 2007


When I look at the Creation time and Modification time in any of the
container views, it shows me the UTC time.

Looking at
zope.app.container.browser.contents.py: Line 174

I found that:

            formatter = self.request.locale.dates.getFormatter(
                'dateTime', 'short')

            created = self.safe_getattr(dc, 'created', None)
            if created is not None:
                info['created'] = formatter.format(created)

            modified = self.safe_getattr(dc, 'modified', None)
            if modified is not None:
                info['modified'] = formatter.format(modified)

is being used to compute them.

I am puzzled, how does the browser set its locale? I guess this must be a
very basic question. But I am not able to figure it out.

Could anyone please explain?

With regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20070113/93970dac/attachment.htm

More information about the Zope3-users mailing list