mark $session->datetime->time as deprecated and remove its use from core code

This commit is contained in:
Graham Knop 2009-10-05 20:56:37 -05:00
parent 5ecc986ec6
commit 60a4a9b140
56 changed files with 94 additions and 92 deletions

View file

@ -850,7 +850,7 @@ $properties2 = {
my $childAsset = $parentAsset->addChild(
$properties2, $properties2->{id},
$session->datetime->time(),
time(),
{ skipAutoCommitWorkflows => 1 }
);
my $testAsset = WebGUI::Asset->newPending( $session, $childAsset->get('parentId') );
@ -874,7 +874,7 @@ $properties2 = {
url => 'moveVersionToParent_03a',
};
sleep 2;
$childAsset->addRevision( $properties2, $session->datetime->time(), { skipAutoCommitWorkflows => 1 } );
$childAsset->addRevision( $properties2, time(), { skipAutoCommitWorkflows => 1 } );
is( $parentVersionTag->get('isCommitted'), 0, 'confimr non-committed parent asset after revision' );
is( $childVersionTag->get('isCommitted'), 0, 'confirm non-committed child asset after revision' );

View file

@ -23,7 +23,7 @@ use WebGUI::Asset;
use Test::More;
use Test::Deep;
my $startingTime = $session->datetime->time();
my $startingTime = time();
my $numTests = 5; # increment this value for each test you create
plan tests => 1 + $numTests;
@ -77,7 +77,7 @@ is($count, 0, 'add: Nothing added if passive profiling is not enabled');
$session->setting->set('passiveProfilingEnabled', 1);
my $timeLogged;
$timeLogged = $session->datetime->time();
$timeLogged = time();
WebGUI::PassiveProfiling::add( $session, $page->getId );
my $count = $session->db->quickScalar('select count(*) from passiveProfileLog where assetId=? and dateOfEntry >= ?',[$page->getId, $startingTime]);