Change DateOffset from Z to +00:00
I missed that getDateTimeOffsetNow is extracting the last 5 chars
for DateTimeOffset. So this patch changes the offset to the original
"+00:00" one.
Tested:
1. unit tests
2. Redfish Validator Tests: no errors found on DateTime or
DateTimeLocalOffset.
```
DateTime 1970-01-01T00:13:27+00:00 date Yes PASS
DateTimeLocalOffset +00:00 string Yes PASS
```
All other errors are not related.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I24977c476f18c88515d759e278ec56e5cbb73b3a
diff --git a/http/ut/utility_test.cpp b/http/ut/utility_test.cpp
index fc8b90e..cb914d5 100644
--- a/http/ut/utility_test.cpp
+++ b/http/ut/utility_test.cpp
@@ -61,17 +61,17 @@
{
// some time before the epoch
EXPECT_EQ(crow::utility::getDateTimeStdtime(std::time_t{-1234567}),
- "1969-12-17T17:03:53Z");
+ "1969-12-17T17:03:53+00:00");
// epoch
EXPECT_EQ(crow::utility::getDateTimeStdtime(std::time_t{0}),
- "1970-01-01T00:00:00Z");
+ "1970-01-01T00:00:00+00:00");
// some time in the past after the epoch
EXPECT_EQ(crow::utility::getDateTimeUint(uint64_t{1638312095}),
- "2021-11-30T22:41:35Z");
+ "2021-11-30T22:41:35+00:00");
// some time in the future, beyond 2038
EXPECT_EQ(crow::utility::getDateTimeUint(uint64_t{41638312095}),
- "3289-06-18T21:48:15Z");
+ "3289-06-18T21:48:15+00:00");
// the maximum time we support
EXPECT_EQ(crow::utility::getDateTimeUint(uint64_t{253402300799}),
- "9999-12-31T23:59:59Z");
+ "9999-12-31T23:59:59+00:00");
}