Wrong Attribute Date Time value return

Author Message

Luca Di Nubila

Saturday 06 January 2007 4:33:12 am

There's a a problem

If you have a class with a datatype "Date and Time" attribute and you want to output its content ........... the date is wrong ............

I used

{$node.object.data_map.data.content|l10n( 'shortdatetime' )}
and the returned value is always 01/01/1970 01:00

Someone knows something ???

Claudia Kosny

Saturday 06 January 2007 8:51:09 am

Hi Luca

As you can see here http://ez.no/doc/ez_publish/technical_manual/3_8/reference/datatypes/date_and_time , the content of a attribute of type 'date and time' returns an object of type 'ezdatetype'. This object has an attribute 'timestamp' which you can use as input for the l10n operator.

So just use

{$node.object.data_map.data.content.timestamp|l10n( 'shortdatetime' )}

and it should work.

Claudia

Luca Di Nubila

Saturday 06 January 2007 10:00:58 am

You' re my Angel

Thanks

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.