MakerLabs ACM
ntp.h
Go to the documentation of this file.
1 /*
2  * Copyright Paul Reimer, 2018
3  *
4  * This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Unported License.
5  * To view a copy of this license, visit
6  * https://creativecommons.org/licenses/by-nc-sa/4.0/
7  * or send a letter to
8  * Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
9  */
10 
11 #pragma once
12 
13 #include "date/ptz.h"
14 
15 #include <chrono>
16 #include <ctime>
17 
18 namespace NetworkManager {
19 
20 using TimeZone = date::zoned_time<
21  std::chrono::system_clock::duration,
22  Posix::time_zone
23 >;
24 
25 auto is_time_set()
26  -> bool;
27 
28 auto to_tm(const TimeZone tp)
29  -> std::tm;
30 
31 auto format_time(const TimeZone& tp, const std::string& fmt)
32  -> std::string;
33 
34 auto format_time(const std::tm* const & timeinfo, const std::string& fmt)
35  -> std::string;
36 
37 } // namespace NetworkManager
auto is_time_set() -> bool
Definition: ntp.cpp:17
std::string string
Definition: oom_killer_actor_behaviour.cpp:24
auto format_time(const TimeZone &tp, const string &fmt) -> string
Definition: ntp.cpp:51
date::zoned_time< std::chrono::system_clock::duration, Posix::time_zone > TimeZone
Definition: ntp.h:23
Definition: mdns_actor.cpp:25
auto to_tm(const TimeZone tp) -> std::tm
Definition: ntp.cpp:28