Jump to content

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

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

Link to comment
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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...