userver: userver/utils/datetime/from_string_saturating.hpp File Reference
Loading...
Searching...
No Matches
from_string_saturating.hpp File Reference

Detailed Description

Saturating converters from strings to time points.

Definition in file from_string_saturating.hpp.

Go to the source code of this file.

#include <chrono>
#include <string>
+ Include dependency graph for from_string_saturating.hpp:
+ This graph shows which files directly or indirectly include this file:

Namespaces

namespace  utils
 Utilities.
 
namespace  utils::datetime
 Date and time utilities.
 

Functions

std::chrono::system_clock::time_point utils::datetime::FromRfc3339StringSaturating (const std::string &timestring)
 Converts strings like "2012-12-12T00:00:00" to std::chrono::system_clock::time_point in UTC timezone and saturates on overflow Example:
 
std::chrono::system_clock::time_point utils::datetime::FromStringSaturating (const std::string &timestring, const std::string &format)
 Converts strings of the specified format starting with "%Y" to std::chrono::system_clock::time_point in UTC timezone and saturates on overflow.