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

R. van Twisk typo3 at rvt.dds.nl
Fri Aug 25 01:26:24 CEST 2006


Elmar Hinz wrote:
> 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
>
>   
Hey Elmar,

I think you already found the problem yourself organizing the IRC meetings.
We couldn't do it with just unix time, a 15o'clock meeting for you is an
8 o'Clock meeting for me. When it comes to calculating time on the SQL
level it comes importand (I know you can do it in php,
but that is old school mysql 3.0 work, we don't want that... do we?  )

I think I have explained different situations already one day in a other 
mail.

You can read up-on this subject more on Joe´s Celko books about SQL,
(http://www.celko.com/) it explains really nice how it works.

Remember, you don't always need a TZ, only by never be able to apply a TZ
to a timestamp is really annoying.

Ries


>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>   


-- 
Ries van Twisk
Freelance Typo3 Developer
=== Private:
email: ries at vantwisk.nl
web:   http://www.rvantwisk.nl/freelance-typo3.html
skype: callto://r.vantwisk
=== Work:
email: ries at livetravelguides.com
web:   http://www.livetravelguides.com





More information about the TYPO3-dev mailing list