[Typo3-dev] convert timestamp to TYPO3 datetime
Sacha Vorbeck
sachav*removethisspamtrap* at gmx.net
Thu Sep 23 16:03:45 CEST 2004
Hi,
I use the following code to generate a 10 digit unix timestamp:
// $row['beginnz'] contains a string in this format: 18.30.00.000000
$dateArrayStartZ = '';
$dateArrayStartZ = t3lib_div::intExplode('.',$row['beginnz']);
$timestampStartZ = mktime(($dateArrayStartZ[0]), ($dateArrayStartZ[1]));
echo(date("G:i", $timestampStartZ));
works.
But when I paste this timestamp into a db-field for a TYPO3 datetime
field, a non valid value is displayed.
When I enter a time directly via the backend, TYPO3 generates a 5 digit
timestamp.
How can I convert my 10 digit unix timestamp into the 5 digit TYPO3
timestamp correctly?
--
thank you - all the best,
Sacha
More information about the TYPO3-dev
mailing list