[TYPO3-dev] process_datamap() & timestamp
Jan Kornblum
jan.kornblum at gmx.de
Thu Nov 24 13:30:40 CET 2011
Hi Ernesto,
thank you, too ;)
> The opposite is the case:
>
> Input coming from browser is UTC (browser transforms the client-side
> input into UTC via JavaScript), which is transformed to server timezone
> and stored into the DB with server TZ.
Are you sure that browser transforms it on client-side? I've tested it
as follows:
1.
DateTimePicker value in Browser is:
16-11-2011
2.
The incoming data array is:
$this->pObj->submittedData['tx_ext_table'][5]['datefield'] = 1321398000
...which also responds to: 16-11-2011
3.
The result in DB is:
1321394400, which responds to 15-11-2011.
So there doesn't seem to take place any transformation on client side.
> This transformation needs to be disabled if you are just reading the
> data from database and re-writing it back (no client involved):
>
> $tce = t3lib_div::makeInstance('t3lib_TCEmain');
> $tce->stripslashes_values = 0;
> $tce->debug = 0;
>> $tce->dontProcessTransformations = 1;
> $tce->start(array(),$cmdmapArray);
> $tce->process_cmdmap();
O.K., that should work for my case. Thanks!
> "transformations" in this situation are stuff that TCEmain does on the
> input that usually comes from the browser (I think *only* RTE and
> datetime in UTC) and which cannot be reapplied at will (not idempotent).
> These are disabled on copy / translation / and other internal methods
> and should probably also be disabled in the situation from Jan.
Regards, Jan
More information about the TYPO3-dev
mailing list