From b2826546c3391066ae011fc9bbadc91bbf3fba82 Mon Sep 17 00:00:00 2001 From: messju Date: Fri, 5 Aug 2005 21:59:15 +0000 Subject: [PATCH] added explanation of changed behaviour of date_format's parsing --- .../language-modifier-date-format.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/en/designers/language-modifiers/language-modifier-date-format.xml b/docs/en/designers/language-modifiers/language-modifier-date-format.xml index 65842121..1256e351 100644 --- a/docs/en/designers/language-modifiers/language-modifier-date-format.xml +++ b/docs/en/designers/language-modifiers/language-modifier-date-format.xml @@ -47,6 +47,24 @@ formatting of the date. If the date passed to date_format is empty and a second parameter is passed, that will be used as the date to format. + + + Since Smarty-2.6.10 numeric values passed to date_format are + always (except for mysql timestamps, see + below) interpreted as a unix timestamp. + + + Before Smarty-2.6.10 numeric strings that where also parsable by + strtotime() in php (like "YYYYMMDD") where sometimes - depending + on the underlying implementation of strtotime() - interpreted as + date strings and not as timestamps. + + + The only exception are mysql timestamps: They are also numeric + only and 14 characters long ("YYYYMMDDHHMMSS"). Mysql timestamps + have precedence over unix timestamps. + + date_format