Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
DateTimeUtils.hpp File Reference
#include <ctime>
#include <iomanip>
#include <sstream>
#include <string>

Go to the source code of this file.

Namespaces

 Enigma
 
 Enigma::DateTimeUtils
 Namespace contains useful Date Time related utility functions.
 

Functions

static std::string Enigma::DateTimeUtils::toString (const std::time_t &time, const std::string_view &format="%Y-%m-%d %H:%M:%S")
 Converts an std::time_t to a string date time with a specific format. More...
 
static std::time_t Enigma::DateTimeUtils::fromString (const std::string &dateTimeStr, const std::string_view &format="%Y-%m-%d %H:%M:%S")
 Converts a string date time with a specific format to an std::time_t. More...
 
static std::string Enigma::DateTimeUtils::now (const std::string_view &format="%Y-%m-%d %H:%M:%S")
 returns current date and time as a string with a specific format More...