nebgor / sma-bluetooth

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

Error with half hour time zones #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set time zone to Adelaide Australia

What is the expected output? What do you see instead?
Expected:
crc=0
Output:
crc=0Date Error! prev=1319328000 current=1319333100

What version of the product are you using? On what operating system?
Current

Please provide any additional information below.
Changed

localOffset=(hour-utctime->tm_hour)+(minute-utctime->tm_min)/60;

to:

localOffset=(hour-utctime->tm_hour)+(float)(minute-utctime->tm_min)/60;

Fixed the problem.

Original issue reported on code.google.com by ste...@whately.me on 23 Oct 2011 at 4:13