[PATCH 2/2] Use get_dive to populate divelistview with dives
Thiago Macieira
thiago at macieira.org
Thu Apr 18 12:55:12 PDT 2013
On quinta-feira, 18 de abril de 2013 12.44.40, Dirk Hohndel wrote:
> > + QDateTime::fromTime_t(d->when).toString(
> > ),
> Oh, didn't see this until just now when I started to look into
> it... as Linus pointed out - you really don't want to do that as this
> will break for anyone who doesn't happen to live in GMT.
Clumsy but works:
QDateTime(1970, 1, 1).addSecs(d->when)
Or just use the methods in C, which are probably more efficient (they won't try
to convert to a format that supports milliseconds since 4700 BC).
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
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: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130418/32d2bd45/attachment.sig>
More information about the subsurface
mailing list