diff options
| author | Edward Welbourne <edward.welbourne@qt.io> | 2022-05-10 19:35:16 +0200 |
|---|---|---|
| committer | Edward Welbourne <edward.welbourne@qt.io> | 2022-05-20 13:08:54 +0200 |
| commit | 1e295cff491b30a88367259115fe429f18bab5f7 (patch) | |
| tree | 54c03cb2d9aab019b840f0f12786ba086cd46b44 /src/corelib/time/qlocaltime.cpp | |
| parent | a534483518252248e68f44fa1913192aa203466d (diff) | |
Replace qt_mktime(), avoiding out-parameters and conversions
Since qt_mktime() took QDate and QTime in/out parameters, its callers
had to convert the milliseconds they had to that form and back again
after. Since it combined optional look-up of zone abbreviation with
determination of offset and DST-ness (both ignore when the
abbreviation was asked for) it made sense to split it in two.
Each takes the millis and whatever knowledge we have of DST. One
returns tha abbreviation; the other returns a QDTP::ZoneState for the
caller that'll be returning that. Outside the system zone, when we
have to fall back to a kludge, their callers can now use the Julian
Day number change for its fake date to directly adjust the millis
there and back (effectively inlining former conversions to-and-from
date and time representation, but optimising out some of the work).
Change-Id: I7aa4583171f77fc0f4aa80c8f564e76995ca69d2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/time/qlocaltime.cpp')
0 files changed, 0 insertions, 0 deletions
