[Typo3-dev] OT: maketime
Peter Niederlag
niederlag at ikd01.de
Fri Sep 24 12:38:13 CEST 2004
Hi Simon,
Simon Child schrieb:
> The next to bottom note on that page:
myself: remember always to RTFM(read the Fine
Manual) to the evry bottom. ;)
Thx, that was exactly what I have been missing in documentation, it
should go somewhere more upwards. ;)
> ==============
> I think it is important to note that the timestamp returned is based upon
> the number of seconds from the epoch GMT, and then modified by the time zone
> settings on the server.
>
> Thus...
>
> mktime(0,0,0,1,1,1970) will not always return 0. For example with the US
> eastern time zone (GMT-5) will return 18000 (5 hours past the epoch) and the
> same function with the time zone set to the US pacific time zone (GMT-8)
> will return 28800 (8 hours past the epoch).
>
> In an instance where you want time zone independence, you should use the
> function gmmktime()
> ==============
Yepp, I will definitly want to use gmmktime then. ;)
Many thx,
Peter
P.S.: I am working on the same problem as Sascha, where we need to
convert hour:minute from some external database to a TYPO3 conform
"timestamp" with $TCA eval=time. Now everything will work out very
nicely. :-> (cause we don't have to do mktime(import['hour']+1,
import['minutes'], 0, 1, 1, 1970...) anymore without knowing why this
stupid '+1' is needed. ;)
--
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
http://www.clown-goli.de * Clown-Comedy-Jonglage-Animation *
More information about the TYPO3-dev
mailing list