diff options
author | Florian Frank <github@ffrnk.de> | 2023-03-03 13:04:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 12:04:13 +0000 |
commit | b9e1b76b3ed88b3eb6f5f0a2b5f2c4856016f972 (patch) | |
tree | b217056ac1b47990afeb6448ebaf5f920adeca95 | |
parent | 11447b294a5ad4d8be08a466f769670aa7ed924a (diff) | |
download | vSomeIP-b9e1b76b3ed88b3eb6f5f0a2b5f2c4856016f972.tar.gz |
Fix timestamp format of log message (#411)
tm_mon is counted from 0, so needs to be incremented by 1
Signed-off-by: Florian Frank <git@ffrnk.de>
Co-authored-by: Florian Frank <git@ffrnk.de>
-rw-r--r-- | implementation/logger/src/message.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/implementation/logger/src/message.cpp b/implementation/logger/src/message.cpp index 3363416..6787452 100644 --- a/implementation/logger/src/message.cpp +++ b/implementation/logger/src/message.cpp @@ -82,7 +82,7 @@ message::~message() { #ifndef ANDROID std::cout << std::dec << std::setw(4) << its_time->tm_year + 1900 << "-" - << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_mon << "-" + << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_mon + 1 << "-" << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_mday << " " << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_hour << ":" << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_min << ":" @@ -124,7 +124,7 @@ message::~message() { if (its_logfile.is_open()) { its_logfile << std::dec << std::setw(4) << its_time->tm_year + 1900 << "-" - << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_mon << "-" + << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_mon + 1 << "-" << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_mday << " " << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_hour << ":" << std::dec << std::setw(2) << std::setfill('0') << its_time->tm_min << ":" |