By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,405 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,405 IT Pros & Developers. It's quick & easy.

Displaying time in different time zones

P: n/a
(yes, another timezone question...)

I'm trying to get to grips with times, and as an exercise am trying to
create a function to display the time in various places.

The way I'm currently doing this is as follows:

// -------------------------------
putenv("TZ=GMT"); //set to GMT
$time_to_convert = mktime(15,0,0); //gives me 3pm GMT

echo(strftime('%d/%m/%y %H:%M',$time_to_convert)); //3pm

putenv("TZ=CET");
echo(strftime('%d/%m/%y %H:%M',$time_to_convert)); //7pm
// -------------------------------

That seems to work fine, and gives me the dates in the various places.
The question I have, is how can I determine if a given country is in
daylight-savings?

Essentially, what I want to achieve is a list that will tell me what
time it is in a given country right now. (A bit like the World Clock
http://www.timeanddate.com/worldclock/)

thanks,

Mark

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Cylindric wrote:
<snip>
The question I have, is how can I determine if a given country is in
daylight-savings?


http://www.twinsun.com/tz/tz-link.htm

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #2

P: n/a
hmmm, that looks interesting. Should be able to get a decent list out
of that. thanks

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.