by the way, i also want to get the weather for that country as well...
current time for the desired country
Moderator: General Moderators
current time for the desired country
hi, i am looking for a function the will get the time for a specific country where the the time that will reflect in the users all over the world will view the time where the hosting server will be...i hope you understand...for example, if the server is in india, and i am a user from italy, i will be able to view the indian time in my computer... 
by the way, i also want to get the weather for that country as well...
by the way, i also want to get the weather for that country as well...
You'll have to gather the data and put it into a table.
I'd recomend taking a look at The World Factbook They also have a downloadable one I belive...
I'd recomend taking a look at The World Factbook They also have a downloadable one I belive...
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Getting the time set on the server is really simple: time(). Whether that is accurate to where the server is located is up to its administrator, however if you want to place the server in a specific location gmmktime() is more useful to get a standardized time which can be offset however you wish from GMT. Depending on server settings, it may not take daylight savings into account. If this is the case, you'll have to build the logic for when to adjust the time further based on your regional daylight rules.