WXSIM-EWN Forecast.php Next Update Time wrong

Loving the WXSIM-EWN scripts now I have them working thanks to Wim. One thing of note is the “Next update:” time at the top of the page. I don’t understand where it is getting this from, and it’s completely wrong, see here:

https://www.360shetland.co.uk/weather/wxsim-ewn/forecast.php

WXSim updates the forecast every three hours with the exception of midnight, so the next update right now should be 08/01/25 15:14, not 08/01/25 05:14. Any ideas? Ideally I would like to change this to “Issued at:” with the time of the current lastret.txt but my PHP skills are a bit lacking. If it was python… :slight_smile:

Thanks, Rory

The WXSIM PC program does not tells us in its data when it will run again.

You have to set the times yourself in your WXSIM PC program.

Check wxsim-ewn/wxsim/config.php line 29->30. It now reads something like

$updatehrs = array(5,10,15,20);  # Hours when wxsim runs
$updateminute = 14; 	              # minutes past full hour for upload time

Adjust as you find appropriate for your WXSIM PC program settings.

Wim

P.S. be aware that this are old scripts which are not maintained anymore by the original author.
I am not sure that the script uses these settings but it seems obvious.
But it will need some testing to be sure.

Update wxsim-ewn/wxsim/frc.php line 24 from

$thishr = date('i');   # 2022-05-01

to

$thishr = date('G');  # 2025-01-08 

That should solve it.

1 Like

Thanks Wim, I changed it to the actual hours, however it seems to jump to the next update time each time it is refreshed. I found the following code in frc.php so uncommented the updated line and commented out the next update:

       '.UPDATED.': '.date($timeFormat,filemtime($path_to_lastret)).' <br/>
    <!--  '.NXTUPDATE.': '.$wxallnext.' -->

Working great now, thank you. I just need to get it into a responsive iframe for my main weather site.

Cheers, Rory

I updated the commented items for current and next update .
Attached version show current upload time of lastret.txt
and next expected run WXSIM on PC

frc.php.zip (4.6 KB)

Also I will try to make some install documentation for new users.

Wim

That’s great Wim, and thank you for all your help. The comments in the PHP files are very useful, but some documentation for new users would be great. I have it up and running on my main weather page now with a fully dynamic and responsive iFrame. I’ll start another post with the code, it resizes the frame dynamically as you click on the tabs, always displaying the full content. See here:

https://www.360shetland.co.uk/weather/forecast.php

The background now changes between light and dark mode, I’m working on the CSS to enable light and dark mode for the EWN style page.