summaryrefslogtreecommitdiff
path: root/redfish-core/include/utils/extern
AgeCommit message (Collapse)AuthorFilesLines
2023-11-06Move date_h to pragma onceEd Tanous1-5/+1
Change-Id: I04864e8c47c8bb1763016b6ba1e5826450afdc72 Signed-off-by: Ed Tanous <edtanous@google.com>
2023-10-24utils: date: fix clang warningPatrick Williams1-4/+4
``` ../redfish-core/include/utils/extern/date.h:983:34: error: identifier '_d' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] 983 | CONSTCD11 date::day operator "" _d(unsigned long long d) NOEXCEPT; | ~~~~~~~~~~~~^~ | operator""_d ../redfish-core/include/utils/extern/date.h:984:34: error: identifier '_y' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] 984 | CONSTCD11 date::year operator "" _y(unsigned long long y) NOEXCEPT; | ~~~~~~~~~~~~^~ | operator""_y ``` Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2304818ddc498441f9ed2ede54c92b7f7c48b7c1
2023-09-08Simplify datetime parsingEd Tanous1-0/+8254
This code as it stands pulls in the full datetime library from boost, including io, and a bunch of timezone code. The bmc doesn't make use of any of this, so we can rely on a much simplified version. Unfortunately for us, gcc still doesn't implement the c++20 std::chrono::parse[1]. There is a reference library available from [2] that backports the parse function to compilers that don't yet support it, and is the basis for the libc++ version. This commit opts to copy in the header as-written, under the assumption that we will never need to pull in new versions of this library, and will move to the std ersion as soon as it's available in the next gcc version. This commit simplifies things down to improve compile times and binary size. It saves ~22KB of compressed binary size, or about 3%. Tested: Unit tests pass. Pretty good coverage. [1] https://en.cppreference.com/w/cpp/chrono/parse [2] https://github.com/HowardHinnant/date/blob/master/include/date/date.h Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I706b91cc3d9df3f32068125bc47ff0c374eb8d87