[TYPO3-dev] process_datamap and time() problem

bagad jpmonot at gmail.com
Sat Jun 20 12:12:11 CEST 2009


Hello,

In a table I have a field named date_moderation (int 11)
such defined in tca :
...
"config" => Array (
"type" => "input",
"size" => "10",
"max" => "20",
"eval" => "datetime",
"default" => "0",
"checkbox" => "0"
)
...

In a BE module I wrote the following code :

$data = array();
$cmd = array();
$token = $uid;
$data[$table_to_insert][$token]['comment_moderateurs'] = $comment;
$data[$table_to_insert][$token][date_moderation'] = time();
.......etc
$cmd[$table_to_insert][$token]['move'] = $this->conf['RejectPid'];
$tce = t3lib_div::makeInstance('t3lib_TCEmain');
$tce->stripslashes_values = 0;
$tce->start($data,$cmd);
$tce->process_datamap();
$tce->process_cmdmap();

Everything is ok including a normal update for the tstamp field but the
problem comes with the date_moderation field where I got a GMT timestamp
instead of an expected GMT+2 timestamp. I verified that the time() function
works fine and displays the expected timestamp (GMT + 2).

Thanks for your answers.
-- 
View this message in context: http://www.nabble.com/process_datamap-and-time%28%29-problem-tp24123774p24123774.html
Sent from the TYPO3 Dev mailing list archive at Nabble.com.





More information about the TYPO3-dev mailing list