Scarab  v3.2.0
Project 8 C++ Utility Library
time.cc
Go to the documentation of this file.
1 /*
2  * time.cc
3  *
4  * Created on: Oct 29, 2013
5  * Author: nsoblath
6  */
7 
8 
9 #define SCARAB_API_EXPORTS
10 
11 #include "time.hh"
12 
13 #include "date.h"
14 
15 namespace scarab
16 {
17 
18  // Combined date & time, according to the ISO 8601 standard: e.g. 2015-01-31T22:35:58Z
19  SCARAB_API char date_time_format[] = "%Y-%m-%dT%H:%M:%SZ";
20 
22  {
23  using namespace std::chrono;
24  return date::format(scarab::date_time_format, time_point_cast<microseconds>(system_clock::now()));
25  }
26 
27 } /* namespace scarab */
#define SCARAB_API
Definition: scarab_api.hh:24
auto format(const std::locale &loc, const CharT *fmt, const Streamable &tp) -> decltype(to_stream(std::declval< std::basic_ostream< CharT > &>(), fmt, tp), std::basic_string< CharT >
Definition: date.h:5663
std::string get_formatted_now()
Definition: time.cc:21
char date_time_format[]
Definition: time.cc:19