Hi guys,
I’m having a couple of issues with using strtotime(), date(), and time().
The first is: I used strtotime() to get the unix of a specific date and time (worked great, even outputted the correct time using date() to return it). However when I went to post information on it (I set it up so that you can’t post after the event started), it told me it already started like an hour before it was supposed to. To determine whether you can post or not I used:
[PHP]if (time() > $event[‘when’]) { echo “too late.”; } else { do it }[/PHP]
That had me very confused.
Then I decided instead of manually inputting the event times I would pull them from an XML file, which I had no trouble reading. I used: [PHP]$day = “Sun”;
$time = “1:00”;
strtotime(“Next $day, $time PM”)[/PHP]
This outputted a unix timestamp but then date() returned it as being 7 PM on Sunday instead.
Any ideas what would be causing these issues?