Re: Sniping on the List
| From: | Stuart Dallas | Date: | Thu, 17 Nov 2011 16:58:02 +0000 |
| Subject: | Re: Sniping on the List | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315727@lists.php.net to get a copy of this message | ||
On 17 Nov 2011, at 16:33, Tedd Sperling wrote:
> On Nov 17, 2011, at 11:07 AM, Stuart Dallas wrote:
>> On 17 Nov 2011, at 16:01, Tedd Sperling wrote:
>> To all:
>>>
>>> Okay, so now that we have had people reply, here's my take.
>>>
>>> The Unix timestamp started on 01 Jan 1970 00:00:00 +0000 -- and that was a Thursday.
>>>
>>> The second before (i.e., 31 December, 1969 23:59:59:59 + 0000) was null, which was
>>> Wednesday.
>>
>> I take issue with this. The second before was -1 seconds from the epoch. Null is the
>> absence of a value, so you can't get to null by simple arithmetic. I learnt about negative
>> numbers from the Greeks. And no, I'm not going to comment on their current mathematical
>> difficulties.
>>
>> Hmm.
>>
>> D'oh!
>>
>> But the point still stands: -1 !== null.
>>
>> -Stuart
>
> Leave it to you to get all Greek on me. :-)
>
> Consider this -- do you think the second before the "Big Bang" was negative or null?
I don't know. There's no point concerning ourselves with unanswerable questions.
> Likewise, the Unix timestamp was defined to start at a specific point in time -- it does not
> address/define what time came before. Thus, what came before was not negative, but rather
> 'undefined'. I claim 'null' is a better fit for 'undefined' than
> negative -- plus it works.
The epoch specifies the exact time that 0 represents. It makes no claims as far as that being the
start of anything...
"defined as the number of seconds elapsed since midnight Coordinated Universal Time (UTC) of
Thursday, January 1, 1970 (Unix times are defined, but negative, before that date)"
[http://en.wikipedia.org/wiki/Unix_time]
> For example, if you push '-1' though strtotime(-1), you'll get Wednesday only
> one day a week -- whereas 'null' works every time.
Technically I see that as a bug. I believe strtotime(null) should return null, but due to the way
type inference works, null is interpreted as 0. The point here being that you're not getting
the time at null, you're getting the time at 0.
> My point stands: null == Wednesday. :-)
It may stand, but it's standing on foundations of null space :)
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/