Multiple implementations of the same back-end application. The aim is to provide quick, side-by-side comparisons of different technologies (languages, frameworks, libraries) while preserving consistent business logic across all implementations.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
554 B

#include "SystemTimeProvider.h"
namespace nxl::autostore::infrastructure {
SystemTimeProvider::Clock::time_point SystemTimeProvider::now() const
{
return Clock::now();
}
std::tm SystemTimeProvider::to_tm(const Clock::time_point& timePoint) const
{
auto time_t_now = Clock::to_time_t(timePoint);
return *std::localtime(&time_t_now);
}
SystemTimeProvider::Clock::time_point
SystemTimeProvider::from_tm(const std::tm& tm) const
{
return Clock::from_time_t(std::mktime(const_cast<std::tm*>(&tm)));
}
} // namespace nxl::autostore::infrastructure