userver
C++ Async Framework
Loading...
Searching...
No Matches
from_string_saturating.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/utils/datetime/from_string_saturating.hpp
4
/// @brief Saturating converters from strings to time points.
5
/// @ingroup userver_universal
6
7
#
include
<
chrono
>
8
#
include
<
string
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
utils
::
datetime
{
13
14
/// @brief Converts strings like "2012-12-12T00:00:00" to
15
/// std::chrono::system_clock::time_point in UTC timezone and saturates on
16
/// overflow
17
std::chrono::system_clock::time_point
FromRfc3339StringSaturating
(
18
const
std::string& timestring);
19
20
/// @brief Converts strings of the specified format starting with "%Y" to
21
/// std::chrono::system_clock::time_point in UTC timezone and saturates on
22
/// overflow.
23
std::chrono::system_clock::time_point
FromStringSaturating
(
24
const
std::string& timestring,
const
std::string& format);
25
26
}
// namespace utils::datetime
27
28
USERVER_NAMESPACE_END
userver
utils
datetime
from_string_saturating.hpp
Generated on Wed Oct 4 2023 12:19:36 for userver by
Doxygen
1.9.8