Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
Time structure conversions

Functions

TimeZoneStruct time_shield::to_time_zone_struct (tz_t offset)
 Converts an integer to a TimeZoneStruct.
 
TimeZoneStruct time_shield::to_tz (tz_t offset)
 Alias for to_time_zone_struct function.
 
TIME_SHIELD_CONSTEXPR tz_t time_shield::time_zone_struct_to_offset (const TimeZoneStruct &tz) noexcept
 Convert a TimeZoneStruct to a numeric UTC offset (seconds).
 
TIME_SHIELD_CONSTEXPR tz_t time_shield::tz_to_offset (const TimeZoneStruct &tz) noexcept
 Alias for time_zone_struct_to_offset.
 
TIME_SHIELD_CONSTEXPR tz_t time_shield::to_offset (const TimeZoneStruct &tz) noexcept
 Alias for time_zone_struct_to_offset.
 

Detailed Description

Function Documentation

◆ time_zone_struct_to_offset()

int time_shield::time_zone_struct_to_offset ( const TimeZoneStruct & tz)
inlinenoexcept

Convert a TimeZoneStruct to a numeric UTC offset (seconds).

Parameters
tzTime zone descriptor.
Returns
UTC offset in seconds (local = utc + offset).

Definition at line 97 of file time_zone_struct.hpp.

◆ to_offset()

int time_shield::to_offset ( const TimeZoneStruct & tz)
inlinenoexcept

Alias for time_zone_struct_to_offset.

Convert a TimeZoneStruct to a numeric UTC offset (seconds).

Parameters
tzTime zone descriptor.
Returns
UTC offset in seconds (local = utc + offset).

Definition at line 115 of file time_zone_struct.hpp.

◆ to_time_zone_struct()

TimeZoneStruct time_shield::to_time_zone_struct ( tz_t offset)
inline

Converts an integer to a TimeZoneStruct.

Parameters
offsetThe integer to convert.
Returns
A TimeZoneStruct represented by the given integer.

Definition at line 47 of file time_zone_struct.hpp.

◆ to_tz()

TimeZoneStruct time_shield::to_tz ( tz_t offset)
inline

Alias for to_time_zone_struct function.

Converts an integer to a TimeZoneStruct.

Parameters
offsetThe integer to convert.
Returns
A TimeZoneStruct represented by the given integer.

Definition at line 62 of file time_zone_struct.hpp.

◆ tz_to_offset()

int time_shield::tz_to_offset ( const TimeZoneStruct & tz)
inlinenoexcept

Alias for time_zone_struct_to_offset.

Convert a TimeZoneStruct to a numeric UTC offset (seconds).

Parameters
tzTime zone descriptor.
Returns
UTC offset in seconds (local = utc + offset).

Definition at line 108 of file time_zone_struct.hpp.