Hi,
I am currently trying to install the cloud height graphic v2.1 on to my website however I am having a slight issue.
It seems to have the the timezone mixed up, when it is night time it shows the day time image and vice versa. It appears to be set on UTC time, however I can’t seem to find where this is changed in the script. All the other times on my website are fine - it is just the cloud height graphic that is wrong.
Can anybody help/advise how I can fix this issue.
My website is:http://www.micklehamweather.com/wxindex.php
Any help will be much appreciated.
Thanks.
Hi,
I am still struggling with this and it has got me completely stumped!
When I run the following test,
http://www.micklehamweather.com/cloud-base.php?uom=M&html=1
I get the following,
Date/Time: Sun, 03 Apr 2011 00:23:43 +0000 (night)
Conditions: Dry, overcast
Cloud Alt: 922m (ASL)
Sunrise: Sun, 03 Apr 2011 06:36:00 +0000
Sunset : Sun, 03 Apr 2011 18:12:00 +0000
TZ: UTC (GMT+0 hours)
BG: cb-bg-00autn.png
Moon age: 29 days, 3 hours, 37 minutes (29.15 days)
I don’t see image, but that doesn’t appear to be a problem because the image appears on my website.
The problem is the ‘Date/Time’ and ‘TZ’ is set to UTC time, however I need to to be set to ‘Australia/Melbourne’ time.
As an example, it needs to be ‘TZ: Australia/Melbourne (GMT+10 hours)’
Does anybody how I can change this, or where it is getting the time zone from??
Like I said previously, all the other times on my website (and WD) are fine. The time zone set in settings.php is set to ‘Australia/Melbourne’ and my Long/Lat in WD is correct.
I just can’t seem to work out where it is pulling the time zone from.
Any help on this would be much appreciated.
Thanks.
I get:
Date/Time: Sun, 03 Apr 2011 11:28:42 +1000 (day)
Conditions: Dry, overcast
Cloud Alt: 1009m (ASL)
Sunrise: Sun, 03 Apr 2011 06:36:00 +1000
Sunset : Sun, 03 Apr 2011 18:12:00 +1000
TZ: Australia/Melbourne (GMT+10 hours)
BG: cb-bg-00autd.png
Moon age: 29 days, 4 hours, 42 minutes (29.2 days)
Hi Niko…correct I think to have fixed the issue!!
I added the following into my cloud-base.php and it has seemed to have fixed the problem!!
$ourTZ = “Australia/Melbourne”;
Set timezone in PHP5/PHP4 manner
if (!function_exists(‘date_default_timezone_set’)) {
putenv(“TZ=” . $ourTZ);
} else {
date_default_timezone_set(“$ourTZ”);
}
It took me a couple of days to get there, but it appears to be working now!!!
It all looks to be working 