Re: Sniping on the List

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 20, 2011, at 4:59 PM, Geoff Shang wrote:

> On Sun, 20 Nov 2011, Tedd Sperling wrote:
> 
>> I appreciate your time and comments. However, you missed the point I was trying to make, which does not have anything to do with timezones. If you copy my code and place it on any server in the world, you'll observe the same results as I did.
> 
> NO I won't, and timezones do matter.
> 
> This server is set to UTC and uses PHP 5.2.6.
> 
> Lets skip right to your point.
> 
> From your script on your server:
> 
> String Given: null
> 
> Seconds Computed from String: null
> 
> Date from Seconds Computed: 31 December, 1969 : Wednesday
> ___________________________________________________________________________
> 
> From the script on my server:
> 
>   String Given: null
> 
>   Seconds Computed from String: null
> 
>   Date from Seconds Computed: 1 January, 1970 : Thursday
>     __________________________________________________________________

Geoff:

Hmmm, granted your output is different than mine. But I think there is something else beside timezones going on here, but I could be wrong.

My server is set to America New York (+5 hours) and uses PHP version 5.2.17

Let's consider this -- you are in a different time zone than me, right? You said UTC and mine is America New York. As such you claim is that your strtotime() function will return a different result for you as compared to me because of the time zone differences, right?

If so, then tell me why I can take both sites (your and mine) and click the Submit buttons at the same time and the forms will report back the exact same number of elapsed seconds. Try it (you got to be quick):

http://www.webbytedd.com/cccc/strtotime/index.php
http://quitelikely.com/~geoff/strtotime/index.php

Why is that? By what you said, shouldn't the reports be offset (+5 hours) by the local timezone differences?

What am I not understanding here?

Cheers,

tedd


_____________________
tedd@xxxxxxxxxxxx
http://sperling.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux