|
Post by toolman on Jun 25, 2020 11:42:06 GMT -8
Hi all
A quick question, in the WeatherData theres a column TimeStamp for each recorded event, but in mine the value seem to be two hour off, and I can't figure out why.
If I check current_time in the db, it's correct. Time on the SkyWeatherPi is also correct, so why is this value off?
br J
|
|
|
Post by doxidad on Jun 25, 2020 13:31:29 GMT -8
The time is stored in UTC Is your time zone + or - 2hrs from UTC?
|
|
|
Post by toolman on Jun 26, 2020 1:16:52 GMT -8
Yes, I'm +2h, So, stored as UTC not local. Is there any way to change this, and more importantly, should this be changed? A client/consumer could of course always compensate for this.
And on that subject - I think windspeed is also stored as mph? Can be changed to metric?
|
|
|
Post by doxidad on Jun 26, 2020 4:38:56 GMT -8
SkyWeather is storing local time. The database converts it to UTC. I believe there is a way of configuring the database to use local time.
SkyWeather stores the wind speed as MPH. You would have to modify SkyWeather to convert the MPH to metric before it stores the value in the database.
|
|
smurphy
Full Member
Posts: 169
Raspberry Pi: Yes
Other Device: many ...
|
Post by smurphy on Jun 26, 2020 7:56:44 GMT -8
So - degrees Celcius are stored in Metric, and Windspeed in Imperial Format? That is wrong. I thought the data was stored as below:
as3935LightningCount: Counter as3935LastInterrupt: as3935LastDistance: as3935LastStatus: currentWindSpeed: Kph currentWindGust: Kph currentWindDirection: ° currentWindDirectionVoltage: ? totalRain: mm bmp180Temperature: °C bmp180Pressure: hPa / milli bars bmp180Altitude: m bmp180SeaLevel: hPa / milli bars outsideTemperature: °C outsideHumidity: % insideTemperature: °C insideHumidity: % AQI: µg/m³
|
|
|
Post by doxidad on Jun 27, 2020 3:14:13 GMT -8
You are Correct. The module util.py does the conversion Not sure why I didn't see that before.
Where's the sword to fall on?
|
|
|
Post by SDL on Jun 27, 2020 7:40:31 GMT -8
No sword. Smurphy fell on his own sword. A close (20m) lightning strike just killed his station!
BP
|
|