bloomberg / bde

Basic Development Environment - a set of foundational C++ libraries used at Bloomberg.
Apache License 2.0
1.67k stars 316 forks source link

Test failure in ball_recordstringformatter.t #284

Closed greghogan closed 1 year ago

greghogan commented 1 year ago

bde 3.110.0.3 bde-tools 3.110.0.0

$ ./ball_recordstringformatter.t 14 v v
TEST /tmp/guix-build-bloomberg-bde-3.110.0.3.drv-0/source/groups/bal/ball/ball_recordstringformatter.t.cpp CASE 14

TESTING: Records Show Calculated Local-Time Offset
==================================================

Test Constructors
mX0.timestampOffset().totalMilliseconds() = 2147483647
mX1.timestampOffset().totalMilliseconds() = -2147483648

Test Manipulators and Accessor

Test Fixed and Calculated Offsets
dtUtc = 19FEB2014_00:00:00.000000, dtWithOffset = 19FEB2014_03:47:00.000000
    ossExpected.str() = 2014-02-19T03:47:00+03:47, ossActual.str() = 2014-02-19T03:47:00+03:47
localTimeOffsetInSeconds = 0
dtUtc = 19FEB2014_00:00:00.000000, dtWithLTO = 19FEB2014_00:00:00.000000
    ossExpected.str() = 2014-02-19T00:00:00+00:00, ossActual.str() = 2014-02-19T00:00:00Z
Error /tmp/guix-build-bloomberg-bde-3.110.0.3.drv-0/source/groups/bal/ball/ball_recordstringformatter.t.cpp(645): (ossExpected.str() == ossActual.str())    (failed)
Error, non-zero test status = 1.
mversche commented 1 year ago

This appears to be related to bdlt_iso8601util using "Z" as (standard) shorthand for UTC (timezone offset of 0). The expected results do not account for that, and we presumably have not tested with a machine with a UTC environment configuration.

mversche commented 1 year ago

Internal issue tracker 170729712

osubboo commented 1 year ago

The fix is merged into internal codebase and propagated to the github.