eive-obsw/mission/utility/Timestamp.cpp
Jakob Meier c31ae5073b
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
fixed header name
2021-12-22 11:20:05 +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) + "-";
}