how to get the current time in ezpublish?

Author Message

xiao jc

Monday 24 May 2004 11:31:20 pm

thanks alot

Tore Skobba

Monday 24 May 2004 11:54:12 pm

In a template do {currentdate()}, this will return time in seconds since 1970. In order to format it do {currentdate()|datetime(custom, "%Y %m %d)}, which will return date on this form 2004 10 26

See here for more:
http://www.ez.no/ez_publish/documentation/development/libraries/ez_template/operators/miscellaneous

http://www.ez.no/ez_publish/documentation/customization/tips_tricks/date_and_time_formats

Cheers
Tore

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

eZ debug

Timing: Jan 18 2025 21:08:48
Script start
Timing: Jan 18 2025 21:08:48
Module start 'layout'
Timing: Jan 18 2025 21:08:48
Module start 'content'
Timing: Jan 18 2025 21:08:49
Module end 'content'
Timing: Jan 18 2025 21:08:49
Script end

Main resources:

Total runtime0.7541 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0069 589.4766152.6406
Module start 'layout' 0.00690.0023 742.117239.4766
Module start 'content' 0.00920.7436 781.5938457.9766
Module end 'content' 0.75280.0013 1,239.57038.1250
Script end 0.7540  1,247.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4571160.0002
Check MTime0.00130.1757160.0001
Mysql Total
Database connection0.00110.146010.0011
Mysqli_queries0.716194.9644540.0133
Looping result0.00040.0590520.0000
Template Total0.726496.320.3632
Template load0.00230.306220.0012
Template processing0.724196.020020.3620
Template load and register function0.00020.023110.0002
states
state_id_array0.00120.162110.0012
state_identifier_array0.00080.108420.0004
Override
Cache load0.00190.2527110.0002
Sytem overhead
Fetch class attribute can translate value0.00050.071520.0003
Fetch class attribute name0.00090.117820.0004
XML
Image XML parsing0.00030.035020.0001
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.00130.1693100.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs