eive-obsw/mission/utility/Timestamp.cpp
Jakob Meier 9c42b861f4
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
timestamp for file creation
2021-12-11 11:56:47 +01:00

20 lines
591 B
C++

#include "Timestamp.h"
#include "fsfw/serviceinterface/ServiceInterfacestream.h"
Timestamp::Timestamp() {
ReturnValue_t result = Clock::getDateAndTime(&time);
if (result != RETURN_OK) {
sif::warning << "Timestamp::Timestamp: Failed to get time" << std::endl;
}
}
Timestamp::~Timestamp() {
}
std::string Timestamp::str() {
return std::to_string(time.year) + "-" + std::to_string(time.month) + "-"
+ std::to_string(time.day) + "--" + std::to_string(time.hour) + "-"
+ std::to_string(time.minute) + "-" + std::to_string(time.second) + "-";
}