Trixology

WeatherCat => WeatherCat General Discussion => Topic started by: monymony on October 29, 2013, 11:27:46 PM

Title: MySQL data upload stalling
Post by: monymony on October 29, 2013, 11:27:46 PM
Hello Everyone,


I have created a MySQL database and when WC connects for the first time it creates the tables and uploads my first 9 months of data and then just stopped.  Watching the logs I know the problem record is Mar-09-2008 03:00.  When I look at this record in my .CAT files I notice this i the record where daylight savings time started so the previous record is Mar-09-2008 01:55.


68796 t:090150 T:-1 Ti:21.33 D:-8.67 Pr:1015.8449 W:11.27 Wd:293 Wc:-4.83 Wg:33.8 Ph:0 P:0 H:56 Hi:28 Pm:44.7 Py:198.37 V:4
68797 t:090155 T:-0.89 Ti:21.44 D:-8.56 Pr:1015.7771 W:9.66 Wd:270 Wc:-4.28 Wg:27.36 Ph:0 P:0 H:56 Hi:28 Pm:44.7 Py:198.37 V:4
68798 t:090300 T:-0.89 Ti:21.44 D:-8.83 Pr:1015.9803 W:9.66 Wd:270 Wc:-4.28 Wg:27.36 Ph:0 P:0 H:55 Hi:28 Pm:44.7 Py:198.37 V:4
68799 t:090305 T:-0.94 Ti:21.33 D:-8.89 Pr:1016.048 W:12.87 Wd:270 Wc:-5.11 Wg:30.58 Ph:0 P:0 H:55 Hi:28 Pm:44.7 Py:198.37 V:4



Anyone else see this behavior before?  I will note that this .CAT file was converted by me from WeatherLink so maybe I am missing something with how the annual time changes are handled.


Also, for the MySQL database the times are in UTZ and not my local time zone.  Is there any advantage to having the database setup this way?


Thanks again everyone!
Title: Re: MySQL data upload stalling
Post by: WCDev on October 31, 2013, 04:50:20 PM
Search the forum for 'SQL' - this has something to do with the SQL timezone I'm sure but can't remember the details off the top of my head.
 
Title: Re: MySQL data upload stalling
Post by: monymony on November 01, 2013, 01:17:21 AM
Will do... I had been searching for MySQL but probably should just done the 'sql'.  Thanks for the suggestion.
Title: Re: MySQL data upload stalling
Post by: monymony on November 02, 2013, 01:23:25 AM


Hi WC fans!

I did some digging and sure enough there is a work-around for this issue already posted on this forum.  See http://athena.trixology.com/index.php?action=post;quote=7818;topic=879.0 (http://athena.trixology.com/index.php?action=post;quote=7818;topic=879.0) for more information.


Set the timezone using terminal til GMT, start WeatherCat form terminal. Import the data into MySQL -> Solved the issue.

Changed back to Europe/Oslo, and restart WeatherCat.

If anyone runs into this issue here is what worked for me.

I know a lot of steps but following these I did get around the issue with the data not uploading.  I hope these instructions will prove helpful for someone!
Title: Re: MySQL data upload stalling
Post by: monymony on January 11, 2014, 03:25:31 AM
I finally discovered what is the likely cause of this problem.  MySQL on OSX installs with STRICT_TRANS_TABLES turned on.  If you turn this off following http://stanlemon.net/2013/03/23/mysql-strict-mode-on-os-x/ (http://stanlemon.net/2013/03/23/mysql-strict-mode-on-os-x/) the dates should import correctly from WC into MySQL.  If you change this setting in the CFG file, don't forget to restart MySQL.


Hope this helps!