# a small problem regarding the date udf..

## Recommended Posts

`_DateDiff('s',"1970/01/01 00:00:00",_NowCalc())oÝ÷ ØwöËZéëm~º&¶Å©©è§¶¡zZ_WÛ!¢é]­ën®{azØ¦z)ìyÊ'vÇë¢mcj{¯-}ïM4ÓM4jwpzYb¶¸vÚ¢Ê&zØb"¶­jwb~§v­¶­¶¬~éÜ­ën®{½©nzØZ¶+ªæ¥¶azö¥¹êÞ¶êçyÖò¦~ïm4²®¶­seôFFTFfbb33·2b33²ÂgV÷C³sóó££gV÷C²Åôæ÷t6Æ2×FÖRg&öÒÓs#`

how can i know wich one works correct ?

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

##### Share on other sites

how can i know wich one works correct ?

Count ?

Live for the present,
Dream of the future,
Learn from the past.

##### Share on other sites

what ?... well there's no reason to think that the php one is wrong since lots of ppl use it alot...

i tried to search on google about it but found nothing... so is there any particullar reason why the

autoit one would return a value exacly 7200(seconds) higher?

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

##### Share on other sites

Checked this website : http://oceanpark.com/utc_calculator.html

Used the data from there to test and they match

#include<date.au3>

\$epogh_Web = 1205440806

\$epogh_ai = _DateDiff('s',"1970/01/01 00:00:00","2008/03/13 20:40:06")

\$diff = \$epogh_ai - \$epogh_Web

ConsoleWrite(' \$epogh_Web = ' & \$epogh_Web)

ConsoleWrite(' \$epogh_ai = ' & \$epogh_ai)

ConsoleWrite(' \$diff = ' & \$diff & @crlf)

So my guess is there is a timezone issue in your tests... 2 hours difference?

Edited by Jos

Live for the present,
Dream of the future,
Learn from the past.

##### Share on other sites

lol.... i found out what the prob is....

the time zone here is gmt+2 and 7200=2 hours

so it seams that php calculates the time() on a gmt value and the udf on a local time zone hence the diffrence of 7200

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

##### Share on other sites

lol.... i found out what the prob is....

the time zone here is gmt+2 and 7200=2 hours

so it seams that php calculates the time() on a gmt value and the udf on a local time zone hence the diffrence of 7200

Yes! .... where can I collect my price money ?

Live for the present,
Dream of the future,
Learn from the past.

## Create an account

Register a new account

×

• Wiki

• Back

• Git