Re: Night Time Images
Brought to you by:
iridium
From: Martin G. <gim...@gi...> - 2002-08-13 09:31:02
|
"Jake Ortman" <ja...@or...> writes: >>Yes, change the test so that it's correct for your timezone. Use >> >> if (($regs[2] > 1) && ($regs[2] < 13)) { >> $night = 1; >> } > > That didn't work. It's 11:30 am pacific time right now, and there's > a moon graphic on the site :-). Hmm, that's odd. Let me try and explain how I came up with '> 1' and '< 13'. The Pacific Time Zone is UTC - 7 hours because of Daylight Saving Time, correct me if I'm wrong, I've got my information from this page: http://www.timetemperature.com/tzus/oregon_time_zone.shtml So a timeline would look like this: PDT: 00 ~~~~~~ 06 ------ 12 ------ 18 ~~~~~~ 24 where the ~ marks the hours that belong to the night. The corresponding UTC timezone is: UTC: 07 ~~~~~~ 13 ------ 19 ------ 01 ~~~~~~ 07 So, this means that it's night at your place when the hour is between 7 and 13 UTC or 1 and 7 UTC, i.e., from 1 to 13 UTC. So unless someone can find an error in the above calculations, then I cannot understand why it doesn't work for you... -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather => Shows the current weather on your webpage and PHP Shell => A telnet-connection (almost :-) in a PHP page. |