Personal tools
You are here: Home Documentation How-tos Change the Default date format
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

Change the Default date format

This How-to applies to: Any version.
This How-to is intended for: Integrators, Customizers

How to change the default date format in Plone, with some common examples.
  • Go to the Zope Management Interface (ZMI)
  • Go to /portal_properties/site_properties

There are two variables that control the date display, localTimeFormat and localLongTimeFormat. The second one normally includes the hours and minutes too.

Plone uses the standardized strftime date format specification known from the C programming language.

Let's say you want to change the from year-month-day (2005-01-17) to month day, year (January 17, 2005):

  • Change localTimeFormat to %B %d, %Y
  • Change localLongTimeFormat to %B %d, %Y %H:%M — or %B %d, %Y %I:%M %p if you want to show time as AM/PM

Another example: We want to change the date format to DD.MM.YYYY (17.01.2005):

  • Change localTimeFormat to %d.%m.%Y
  • Change localLongTimeFormat to %d.%m.%Y %H:%M

A full list of all the available format options can be found in the python time module documentation (search for strftime, about halfway).

by rnunez last modified February 4, 2006 - 20:47 All content is copyright Plone Foundation and the individual contributors.

Wrong date/time displaying on some pages in Plone 2.5.2 on Zope 2.9.6?

Posted by Catherine Willliams at March 17, 2007 - 19:44
I can change the default time and date format using these instructions. But... I still get the problem that some pages display the WRONG time (while others display the right time).

An example: I add an event, setting the date to be Thursday June 14, 2007 and the time to be noon to 1pm. On the page that is created for the event, the date and time display correctly. However, on views that display summary information about this event -- for instance a folder or a smartfolder listing the page -- the time displays (incorrectly) as 8 to 9am.

Is this a known bug, or do I need to change some settings somewhere?
Any advice appreciated - thanks.

I have the same problem

Posted by rnunez at March 18, 2007 - 14:31
http://dev.plone.org/plone/ticket/6237

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by