start RPiSdCardManager
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Irini Kosmidou
2022-09-12 17:15:02 +02:00
parent 7bc866a105
commit 002f776bef
5 changed files with 21 additions and 9 deletions

View File

@ -312,17 +312,21 @@ ReturnValue_t ScexDeviceHandler::initializeLocalDataPool(localpool::DataPool& lo
std::string ScexDeviceHandler::date_time_string() {
using namespace std;
string date_time;
Clock::TimeOfDay_t tod;
Clock::getDateAndTime(&tod);
time_t now = time(0);
tm* ltm = localtime(&now);
ostringstream oss(std::ostringstream::ate);
//TODO mit tod ersetzen
if (ltm->tm_hour < 10) {
oss << 1900 + ltm->tm_year << 1 + ltm->tm_mon << ltm->tm_mday << "_0" << ltm->tm_hour;
oss << tod.year << tod.month << ltm->tm_mday << "_0" << ltm->tm_hour;
} else {
oss << 1900 + ltm->tm_year << 1 + ltm->tm_mon << ltm->tm_mday << "_" << ltm->tm_hour;
}
if (ltm->tm_min < 10) {
oss << 0 << ltm->tm_min;
} else {
oss << ltm->tm_min;
}