Cronjob hide.php timestamp problem

Author Message

laurent le cadet

Thursday 02 August 2007 4:22:49 am

Hi,

I want to use the hide.php script to hide contents.
Everything seems to be ok but contents are not hide.

Athe end of the script we've got this :

...
$date = $dateAttribute->content();
            $retractDate = $date->attribute( 'timestamp' );
			mail("laurent@lestudiot.com","dateAttributeName","{$retractDate} - {$currrentDate}");
            if ( $retractDate > 0 && $retractDate < $currrentDate )
			
            {
                eZContentObjectTreeNode::hideSubTree( $node );
                if ( !$isQuiet )
                {
                    $cli->output( 'Hiding node : ' . $node->attribute( 'node_id' ) );
                }
            }
...

And it appears in my tracking email that $retractDate is always greater than the $currrentDate variable.

It doesn't make sense to me because I have contents with an older date than the current date + I have more than 150 contents but recieved less than 50 mails.

Any idea?

Regards.

Laurent

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 10:28:05
Script start
Timing: Jan 18 2025 10:28:05
Module start 'layout'
Timing: Jan 18 2025 10:28:05
Module start 'content'
Timing: Jan 18 2025 10:28:05
Module end 'content'
Timing: Jan 18 2025 10:28:05
Script end

Main resources:

Total runtime0.8980 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.0547152.6250
Module start 'layout' 0.00670.0036 741.679739.4609
Module start 'content' 0.01030.8861 781.1406440.9688
Module end 'content' 0.89640.0016 1,222.10948.1563
Script end 0.8980  1,230.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3617160.0002
Check MTime0.00140.1509160.0001
Mysql Total
Database connection0.00120.131710.0012
Mysqli_queries0.857095.4316460.0186
Looping result0.00050.0567440.0000
Template Total0.866696.520.4333
Template load0.00210.231120.0010
Template processing0.864596.267520.4323
Template load and register function0.00010.011210.0001
states
state_id_array0.00100.106010.0010
state_identifier_array0.00070.080120.0004
Override
Cache load0.00160.180090.0002
Sytem overhead
Fetch class attribute can translate value0.00080.090210.0008
Fetch class attribute name0.00080.085220.0004
XML
Image XML parsing0.00050.059310.0005
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00170.1871160.0001
String conversion0.00000.001240.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs