Sign in to follow this  
Followers 0
Xand3r

a small problem regarding the date udf..

6 posts in this topic

#1 ·  Posted (edited)

_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 :)?

Edited by alexmadman

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 this post


Link to post
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 this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

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 ;)

Edited by alexmadman

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 this post


Link to post
Share on other sites

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

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

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 ? :D

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0