Page MenuHomePhabricator

Avoid std::locale/imbue in DateTimeStrFormat
ClosedPublic

Authored by Fabien on Thu, Jul 11, 07:55.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC4d4fca502dac: Avoid std::locale/imbue in DateTimeStrFormat
Summary
And replace them with just hardcoded ISO8601 strings and gmtime_r.

Pointed out by @laanwj here: #12970 (comment)

Backport of core PR12973 and PR13031
https://github.com/bitcoin/bitcoin/pull/12973/files
https://github.com/bitcoin/bitcoin/pull/13031/files

The build for MSVC is left untested and just backported "as-is". AFAIK
we don't support MSVC build and have no plan to do so, but in the event
this should occur in the future that part of code will be ready.

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Thu, Jul 11, 07:55
Herald added a reviewer: Restricted Project. · View Herald TranscriptThu, Jul 11, 07:55
deadalnix requested changes to this revision.Thu, Jul 11, 11:19

THis fix for MSVC is not backported.

This revision now requires changes to proceed.Thu, Jul 11, 11:19
Fabien updated this revision to Diff 10228.Thu, Jul 11, 11:31

Squashed my commits...

deadalnix accepted this revision.Thu, Jul 11, 11:32
This revision is now accepted and ready to land.Thu, Jul 11, 11:32
This revision was automatically updated to reflect the committed changes.