leoherzog / WundergroundStationForwarder

🌦️ Google Apps Script code to send your weather station data to Wunderground, Windy, PWSWeather, Weathercloud, OpenWeatherMap, WindGuru, and/or CWOP
42 stars 6 forks source link

Date format in pwsweather.com #1

Closed f2mbsb closed 3 years ago

f2mbsb commented 3 years ago

Hello @leoherzog!

Thanks for sharing this script, it is really useful!

I started uploading to pwsweather.com, but it just worked for 12 hours of the day... The problem is that the station wasn't sending time in a 24-hour format. And, occasionally, sent an old date stamp. From the server logs, the timestamp goes from 12 back to 01.

Solution: in code.gs, line 88 https://github.com/leoherzog/WundergroundStationForwarder/blob/4412dda09c165aac73a3f260e0a334ef8d73487b/code.gs#L88 change the time format, replacing "hh" (lowercase) by "HH" (uppercase).

It worked for me.

Cheers.

leoherzog commented 3 years ago

Great catch! That would explain those error emails I've been getting for the last couple of weeks and have been meaning to look into :)

Thanks much!