Weather34 Time Zone Oddity

This section covers the Meteobridge PRO, NANO SD and Raspberry Pi units exclusively

Moderator: Mattk

Post Reply
Car54
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: Tue Dec 22, 2020 4:57 am

Weather34 Time Zone Oddity

Post by Car54 »

The Weather34 template for my Nano SD runs flawlessly, except for a minor oddity.

My weather station is located in the Pacific Time Zone. In the Dashboard Admin page I set the timezone to America/Vancouver. The clock display was off by 4 hours. I set the UTC offset to 4 and it displays correctly.

It's not a big deal - just seems odd.

http://roloff.asuscomm.com:6525/Console/index.php

Is there something I'm doing wrong?
VP2+ Nano SD

BigAlT
Gold Boarder
Gold Boarder
Posts: 170
Joined: Tue Jul 04, 2017 8:41 pm
Location: Washington State

Re: Weather34 Time Zone Oddity

Post by BigAlT »

I have exactly the same setup except using the America/Los Angeles time zone in the dashboard. Works perfectly.

Car54
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: Tue Dec 22, 2020 4:57 am

Re: Weather34 Time Zone Oddity

Post by Car54 »

Yes, I originally tried America/Los_Angeles - same result.

My web server is running Wamp with its php implementation, if that's relevant.

A 4 hour offset is strange. I could possibly understand one hour due to daylight savings time, or some such.

Oh well, it looks fine with the 4 hour offset.
VP2+ Nano SD

Challenger007
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: Thu Feb 04, 2021 5:07 pm

Re: Weather34 Time Zone Oddity

Post by Challenger007 »

Is this a problem with the presets of the weather station? Perhaps it is just when trying to set a different time zone in your program that a failure occurs? If such a problem is not an isolated one, then it is better to focus on those presets that are included in the weather station, but then manually change the time in the results obtained.

User avatar
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1053
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Weather34 Time Zone Oddity

Post by weatherist34 »

Car54 wrote:
Wed Feb 10, 2021 7:49 am
Yes, I originally tried America/Los_Angeles - same result.

My web server is running Wamp with its php implementation, if that's relevant.

A 4 hour offset is strange. I could possibly understand one hour due to daylight savings time, or some such.

Oh well, it looks fine with the 4 hour offset.
Hello Good afternoon

ill try and help but this is a local server environment anomaly .

in wamp itself on the root server directory run a phpinfo.php (it can actually be called anything as long it contains the code <?php phpinfo();?>)

this will pull up what the actual default timezone the installation is using .

if its not America/Vancouver then apply the correct setting via php.ini

date.timezone="America/Vancouver"

the restart Apache !! for it to take effect

this is what I do when installing XAMP on a Mac desktop and when I install a new version of PHP on my local server on an old Mac mini
I always run the phpinfo to check install of modules etc .

if you haven't got a phpinfo.php file you can simply make one with the simple code below and run it in your browser it will screen dump in a browser window with all the information about your installation

<?php
// Show all info
phpinfo();
?>

if you are familiar or know all of that then I dont have any ideas , if it was template I think this would be a widespread anomaly for others , that said I have seen sometimes end users insert the timezone incorrectly which normally is a hidden whitespace on the end of the timezone line in the template setup screen this generally happens from a cut and paste so I always religiously backspace if I use cut and paste to clear the hidden white space.

below shows what I see on an initial fresh install of XAMP I just change those accordingly via phpini to Europe/Istanbul

hope it helps ..Brian
Attachments
2.png
2.png (83.03 KiB) Viewed 376 times

Car54
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: Tue Dec 22, 2020 4:57 am

Re: Weather34 Time Zone Oddity

Post by Car54 »

The default timezone was incorrectly set to UTC. I modified php.ini for the correct timezone and restarted php. Now the default timezone is correct:

http://roloff.asuscomm.com:6525/phpinfo.php

but it makes no difference - it's still off by 4 hours.

Indeed, I can change the time zone in Weather34 to any value and it remains off by 4 hours.

BTW, it's probably not relevant but line 715 in console-setup.php contains:

<input name="lon" type="lon" id="TZ" value="<?php echo $lon; ?>" class="choose">

which I suspect is a typo.
VP2+ Nano SD

Car54
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: Tue Dec 22, 2020 4:57 am

Re: Weather34 Time Zone Oddity

Post by Car54 »

Also probably not relevant, in weather34-clockmod.php, it appears that line 45:

var c=e.getHours()

should occur before it's referenced in line 43:

... if(c<10){c="0"+c}
VP2+ Nano SD

Car54
Fresh Boarder
Fresh Boarder
Posts: 14
Joined: Tue Dec 22, 2020 4:57 am

Re: Weather34 Time Zone Oddity **solved**

Post by Car54 »

Car54 wrote:
Wed Feb 10, 2021 7:49 am
Yes, I originally tried America/Los_Angeles - same result.

My web server is running Wamp with its php implementation, if that's relevant.

A 4 hour offset is strange. I could possibly understand one hour due to daylight savings time, or some such.

Oh well, it looks fine with the 4 hour offset.
Setting the UTC offset to -8 fixes the problem. I suppose it somewhat makes sense since the timezone is GMT-8.
VP2+ Nano SD

User avatar
weatherist34
Platinum Boarder
Platinum Boarder
Posts: 1053
Joined: Tue Mar 28, 2017 6:57 am
Contact:

Re: Weather34 Time Zone Oddity

Post by weatherist34 »

:D :D

good morning


Search Results
Featured snippet from the web
The World Clock – Time Zone Converter – Results
Location Local Time UTC Offset
Vancouver (Canada - British Columbia)
Friday, February 12, 2021 at 12:31:27 pm
UTC-8 hours

hope you resolved your timezone issue , these timezone scripts have been used for many years ive not seen any issues like this or recall any widespread issues amongst end users . so apologies if im reluctant to adjust code that may start breaking thing for others.



brian

Post Reply