[TYPO3-dev] It works! Storing non-UNIX dates

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Wed Aug 23 11:15:43 CEST 2006


Ries van Twisk wrote:
> 2) Calculating with date integers is extremely differcult if you want to 
> calculate
> with timezone in mind, functions do exist that can do that for you. With 
> integers
> you need to write all functions yourself to handle that.
> consider a international conference call and I want to show on each 
> computer (japan, holland, USA)
> the the left to the actual call. This is difficult when working with 
> just integers.

Hi Ries,

I fear that you use UNIX timestamp in a wrong way. A UNIX moment is the 
same moment everywhere, even on the moon. You don't need to bother with 
timezones at all. It's really simpel. A moment is the same moment everywhere.

For transformation to a localized time you don't have to calcualte at all. 
You set the environment variable to the timezone you want to display and 
the server does the localization for you.

If you have problems here, you maybe use windows servers, which make an 
easy thingy totally complicated by running in localized time IFAIK. Than 
you find yourself programming crazy calculations to convert times to other 
timezones.

Regards

Elmar



















More information about the TYPO3-dev mailing list