add dive implementation pushed

Thiago Macieira thiago at
Fri Sep 20 07:04:01 UTC 2013

On sexta-feira, 20 de setembro de 2013 08:56:25, Dirk Hohndel wrote:
> The time zone thing puzzles me. I thought I did that right in the code (not
> for add dive but for the planner itself) but the time is off by an hour...
> And googling really doesn't help... People mostly saying "it's broken in
> Qt4".

QTimeZone was submitted for Qt 5 this Tuesday. I did my initial review of it 
yesterday and, though the API looks good, the implementation needed a few 
updates. I haven't checked yet whether the contributor has updated it today -- 
and today is feature freeze for 5.2.

Without QTimeZone and the QDateTime updates already in for 5.2, QDateTime only 
officially supports "local time" and "universal time", just like POSIX. However, 
since 4.4, the methods setUtcOffset() and utcOffset() exist. I just don't know 
if they work and whether QDateTimeEdit & friends work with them.

I recommend we work with the dates like Git does:
- let the user input them as local time
- use QDateTime to convert to universal time + offset
- store as universal time + offset

Thiago Macieira - thiago (AT) - thiago (AT)
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the subsurface mailing list