diff options
| author | Per Larsson <[email protected]> | 2022-03-23 14:03:01 +0100 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2022-03-23 14:03:01 +0100 |
| commit | a1c5a93627fefa2db6dd3ae620e112ba46065f78 (patch) | |
| tree | 90ae9bf52a10c1ecfcdd85c47fc89ceb22795162 /zencore/compactbinary.cpp | |
| parent | Map derived data references. (diff) | |
| parent | Added route '/prj/list' for retrieving project info. (diff) | |
| download | zen-a1c5a93627fefa2db6dd3ae620e112ba46065f78.tar.xz zen-a1c5a93627fefa2db6dd3ae620e112ba46065f78.zip | |
Merge branch 'main' into ddcref
Diffstat (limited to 'zencore/compactbinary.cpp')
| -rw-r--r-- | zencore/compactbinary.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/zencore/compactbinary.cpp b/zencore/compactbinary.cpp index 7cc6db68a..cb628af4b 100644 --- a/zencore/compactbinary.cpp +++ b/zencore/compactbinary.cpp @@ -54,7 +54,7 @@ GetPlatformToDateTimeBiasInSeconds() #if ZEN_PLATFORM_WINDOWS const uint64_t PlatformEpochYear = 1601; #else - const uint64_t PlatformEpochYear = 1970; + const uint64_t PlatformEpochYear = 1970; #endif const uint64_t DateTimeEpochYear = 1; return uint64_t(double(PlatformEpochYear - DateTimeEpochYear) * 365.2425) * 86400; @@ -71,7 +71,7 @@ DateTime::Now() GetSystemTimeAsFileTime(&SysTime); return DateTime{(EpochBias * SecsTo100nsTicks) + (uint64_t(SysTime.dwHighDateTime) << 32) | SysTime.dwLowDateTime}; #else - int64_t SecondsSinceUnixEpoch = time(nullptr); + int64_t SecondsSinceUnixEpoch = time(nullptr); return DateTime{(EpochBias + SecondsSinceUnixEpoch) * SecsTo100nsTicks}; #endif } @@ -1701,6 +1701,13 @@ CompactBinaryToJson(const CbObjectView& Object, StringBuilderBase& Builder) Writer.WriteField(Object.AsFieldView()); } +void +CompactBinaryToJson(const CbArrayView& Array, StringBuilderBase& Builder) +{ + CbJsonWriter Writer(Builder); + Writer.WriteField(Array.AsFieldView()); +} + ////////////////////////////////////////////////////////////////////////// #if ZEN_WITH_TESTS |