Current

This document is valid for the current version of Plone.

Time and date format

by Mikko Ohtamaa last modified May 02, 2012 02:35 PM
How to set Plone time and date format.

Time and date formatting is used in various places of Plone

  • Editing interface modification dates
  • Event summary listing
  • etc.

Plone 4

For plone 4, the message catalog is used to customize the date format. This is so it can be customized per language.

https://dev.plone.org/wiki/DateTimeFormatting

Plone 3

Time and date format can be set Zope Management Interface

  • Open ZMI
  • Open portal_properties under your site root
  • Open site_properties

You see two properties

  • localTimeFormat (defaults to US style %b %d, %Y)
  • localLongTimeFormat (defaults to US style %b %d, %Y %I:%M %p)

Available formatting codes are described in Python time module documentation.

After editing the properties press Save changes at the bottom of the page.

Example of European style format:

  • localTimeFormat: %d.%m.%Y (like 1.12.2010)
  • localLongTimeFormat: %H:%M %d.%m.%Y (like 12:59 1.12.2010)

Note that some templates may not honor these settings, but may do time and date formatting differently.


Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.