Woke up this morning to an urgent email from Heather saying that her store was down.
I read this *just* after getting out of bed.
While I didn’t fix it, I put a band-aid on it and had the store up and running within an hour(more or less).
Then it kinda slowed down from there.
Got some work on her store done. Found out things that I needed to know.
Then I played around with PHP for a little while and found what could be a bug.
OK, so here’s the thing.
getdate() takes a unix timestamp and parses it out into an array that you can use to get date/time info.
Like the fact that it’s Tuesday or something.
So I was going to do this to track time for working on projects.
Something like a php stopwatch.
I wondered if it worked with small numbers, like 100. See that would just be 1 minute and 40 seconds.
What I got was 19 hours, 1 minute and 40 seconds.
Put in 3600(one hour), get back 20 hours.
And it goes on like this until the 24 hour mark, where it goes back to 0.
If I put in a current timestamp, then it spits out the right time/date/etc.
There must be something I’m missing. Like it’s in a funky timezone or something.
So, I’ll use normal math to do all this.
Not like it’s hard.
- @ January 15, 2008 11:37 pm