Time zones (again)
Linus Torvalds
torvalds at linux-foundation.org
Tue Jun 21 10:26:50 PDT 2016
On Tue, Jun 21, 2016 at 9:08 AM, Thiago Macieira <thiago at macieira.org> wrote:
>
> That function is totally busted, as you've noticed. Not fixing is a
> discouragement, forcing people to find better alternatives.
Quite frankly, not fixing it is just stupid. It doesn't force people
to find better alternatives, it just *annoys* people.
Please just add another signature for the function that does
fromTime_t(qint64, const QTimeZone);
instead of the current clearly broken mess.
Or add a new
fromSecsSinceEpoch()
helper or something. Because "msecs" isn't really a sane format. It's
not something you get from *anything* else. Even when you are 64-bit
clean (perhaps exactly because you know your target is 64-bit),
nothing sane returns msecs.
So forcing those idiotic multiplications by 1000 is not "finding a
better alternative". It's just crazy crap, and makes the Qt date
handling look incompetent. Which it is. Because "time_t" really is not
"unsigned int", and has never EVER been that.
Linus
More information about the subsurface
mailing list