xentara-utils v1.2.1
Xentara utilities library
Loading...
Searching...
No Matches
xentara::utils::ios::ToLocalTime Class Referencefinal

Manipulator for inserting time points into std::ostreams as local time. More...

#include <ios/toLocalTime.hpp>

Public Types

enum class  Format { Full , Compact , Iso }
 Time formats. More...
 

Public Member Functions

 ToLocalTime (std::chrono::system_clock::time_point time, Format format=Format::Full)
 Constructor.
 

Detailed Description

Manipulator for inserting time points into std::ostreams as local time.

Member Enumeration Documentation

◆ Format

Time formats.

Enumerator
Full 

Always output the full time with nanosecond precision.

Compact 

Only show as much of seconds and fractions of a second as necessary.

Iso 

Use ISO 8601/RFC 3999 format.

Constructor & Destructor Documentation

◆ ToLocalTime()

xentara::utils::ios::ToLocalTime::ToLocalTime ( std::chrono::system_clock::time_point  time,
Format  format = Format::Full 
)

Constructor.

Parameters
timeThe time to insert
formatThe format to use