[PATCH] Planner: use time.h and utc_mktime() to retrive the current time (no TZ)

Dirk Hohndel dirk at hohndel.org
Wed Feb 27 10:28:58 PST 2013


Linus Torvalds <torvalds at linux-foundation.org> writes:

> On Wed, Feb 27, 2013 at 10:00 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>
>> This works for me on Linux and Mac.
>>
>> Linus, any concerns?
>
> Looks fine to me.

Thanks. BTW, testing this on Linux and Mac I found a rather embarassing
bug in the calculation of the relative start time. Since I wanted to
make sure that the offset is either from 'now' or the end of the last
dive recorded (in case you plan multiple dives), things would go
horribly wrong if you repeatedly changed the start time offset after you
had added enough data to the plan that this dive would be displayed in
the dive list. Now the planned dive was the last dive and every time
focus left the start time entry field the start time would be moved even
further back.

Oops

Fix pushed.

/D


More information about the subsurface mailing list