bravohe / sma-bluetooth

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

Sunset sunrise times in almanac database not right. #122

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running smatool
2.
3.

What is the expected output? What do you see instead?
When running smatool i see that the sunrise and sunset times entered in the 
almanac database are not right.

What version of the product are you using? On what operating system?
Linux raspberrypi 3.6.11+ #377 PREEMPT Sat Feb 16 17:31:02 GMT 2013 armv6l 
GNU/Linux

Please provide any additional information below.
Before todays Almanac
SELECT sunrise FROM Almanac WHERE date=DATE_FORMAT( NOW(), "%Y-%m-%d" )
Before Check Schema
SELECT data FROM settings WHERE value='schema'
auto_set_dates
DELETE FROM DayData WHERE CurrentPower < 0 or ETotalToday = 9999999.999
SELECT DATE_FORMAT( DateTime, "%Y-%m-%d %H:%i:%S" ) FROM DayData ORDER BY 
DateTime DESC LIMIT 1
Auto set dates from 2013-04-30 19:45:00 to 2013-04-30 22:07:00
SELECT if(((sunrise < NOW()) AND (sunset > NOW())),1,0) FROM Almanac WHERE 
date=        DATE_FORMAT( NOW(), "%Y-%m-%d" )

Original issue reported on code.google.com by piacco...@gmail.com on 30 Apr 2013 at 8:21