First way : On a plone site, go to ZMI and check the "LocalTimeFormat" and "LocalLongTimeFormat" properties inside "portal_properties/site_properties".
Second way : You can modify the DateTime format with this method "mydatetimeobject.strftime(myformat)". Check the "help" link in ZMI for more informations about "DateTime" objects.
First way: By "checked" do you mean check the box to the left? I believe that is only available to delete a property. I have already formatted this field to display the date in the format I want. What do I need to enter some other value to change the timezone? If so, an example would help. The ZMI help is difficult at best to understand.
So if you had already formatted these fields, use the python scripts "toLocalizedTime" or "toPortalTime" to display a DateTime object with the good format.
Here is a similar way to get your plone instance to show the correct timezone:
customize /portal_skins/plone_scripts/toLocalizedTime to look like this:
#given a time string convert it into a DateTime and then format it appropriately
#use time format of translation service
from Products.CMFPlone.PloneUtilities import localized_time
t = DateTime(str(time))
svTime = DateTime.toZone(t,US/Pacific)
return localized_time(svTime, long_format, context)
Change US/Pacific to the timezone you want.
For the calendar to show the correct date you have to edit the following:
/portal_skins/plone_portlets/portlet_calendar
change all occurances of DateTime() to DateTime(US/Pacific)
First way : On a plone site, go to ZMI and check the "LocalTimeFormat" and "LocalLongTimeFormat" properties inside "portal_properties/site_properties".
Second way : You can modify the DateTime format with this method "mydatetimeobject.strftime(myformat)". Check the "help" link in ZMI for more informations about "DateTime" objects.
First way: By "checked" do you mean check the box to the left? I believe that is only available to delete a property. I have already formatted this field to display the date in the format I want. What do I need to enter some other value to change the timezone? If so, an example would help. The ZMI help is difficult at best to understand.
Oups sorry, check = look at ;-)
So if you had already formatted these fields, use the python scripts "toLocalizedTime" or "toPortalTime" to display a DateTime object with the good format.
use them like this inside the tal code :
tal:content="python:here.toLocalizedTime(datetime_object)"
Here is a similar way to get your plone instance to show the correct timezone:
customize /portal_skins/plone_scripts/toLocalizedTime to look like this:
#given a time string convert it into a DateTime and then format it appropriately #use time format of translation service from Products.CMFPlone.PloneUtilities import localized_time t = DateTime(str(time)) svTime = DateTime.toZone(t,
US/Pacific) return localized_time(svTime, long_format, context)Change
US/Pacificto the timezone you want. For the calendar to show the correct date you have to edit the following:/portal_skins/plone_portlets/portlet_calendar
change all occurances of DateTime() to DateTime(
US/Pacific)This fix breaks my site. "NameError: global name
USis not defined"Did I misunderstand its supposed to say US/Pacific Where can I define the timezone?
I second that... George, a href="http://www.squidoo.com/zebra-print-dress">http://www.squidoo.com/zebra-print-dress