baboom09 / sma-bluetooth

Automatically exported from code.google.com/p/sma-bluetooth
0 stars 0 forks source link

Sunrise time mot entered into Almanac #45

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Running the program with lat/long set

What is the expected output? What do you see instead?
I expect the Almanac table in MySQL to be populated correctly.  Instead it's 
setting the sunrise time to be '0000-00-00 00:00:00'.

What version of the product are you using? On what operating system?
0.14 on Fedora 15

Please provide any additional information below.
This can be *fixed* quite easily.  It's a mistake in the second-last line of 
the "sunrise" function.  The brackets are in the wrong place - the line should 
read as follows:

sprintf( returntime, 
"%02.0f:%02.0f",floor(localT),floor((localT-floor(localT))*60));

Without that change, the minutes value is meaning less and MySQL just sticks a 
zero in instead.

Original issue reported on code.google.com by mar...@defiler.co.uk on 2 Nov 2011 at 8:56

GoogleCodeExporter commented 8 years ago
well spotted - already in my code pushed up in 0.16

Original comment by stephenb...@gmail.com on 27 Nov 2011 at 6:07

GoogleCodeExporter commented 8 years ago
version 0.16 doesn't have this fix.

Original comment by stephen....@gmail.com on 16 Dec 2011 at 8:41