Hello all,
I've got a little script which is used by people arround the world. It displays a list of items, a item as a date/time stamp. So when someone adds a item on 3 may 2004 15:30, "3 may 2004 15:30" is displayed with the item.
The server time is used te determine the time. I own the server so i can configure it the way i want.
But now imagine someone from mexico adds a new item, the item get time "3 may 2004 15:30" (the server time). But the mexican guy looks strange and saids "he! that's stupid, it's nowhere near 15:30 over here, you little clock is wrong, stupid script!!11"
Now i can let the mexican guy choose the timezone he's in. For example -3 hours CET. So i do:
$hour=((60*60));
$itemtime=getItemTime()-($hour*3)
print date('someformat', $itemtime);
I'm wondering if this is the best way to do it, or are there other standard ways of doing it?
Thanks.
🙂