Hi all,

I'm really sure how to tackle this. Part of a CMS I'm building is an events calendar. The events in question can be in any part of the world (in any timezone) and the date & time the user enters for the event is considered to be the local time of that event.

So when I enter 2004-09-03 23:00, I'm indicating the event is on September 9th 2004 @ 11pm IN THAT LOCATION, not in GMT (as opposed to all other dates on the site, which I record the GMT date-time and the offset based on the current timezone of the application).

Basically, the problem is that I want to be able to manipulate and work with the event date. It's relatively easy to get "March" from "03", but it's impossible to get "Wednesday", as far as I can tell...

If I use strtotime(), I'm handed back a GMT timestamp, whereas I need a *local* timestamp. All I can think of here is to record/know the Timezone of every event, but that puts a rather large burden on the user (to get it right), so that I can apply it to the UNIX timestamp.

Am I missing something here, I do I really need to know the GMT offset of every event?

---
Justin French
http://indent.com.au

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



Reply via email to