#include <cpptoml.h>
Definition at line 152 of file cpptoml.h.
◆ CPPTOML_DEPRECATED()
cpptoml::offset_datetime::CPPTOML_DEPRECATED |
( |
"from_local has been renamed to from_zoned" |
| ) |
const & |
|
inline |
Definition at line 171 of file cpptoml.h.
static offset_datetime from_zoned(const tm &t)
◆ from_utc()
Definition at line 174 of file cpptoml.h.
174 {
175 offset_datetime dt;
176 dt.year = t.tm_year + 1900;
177 dt.month = t.tm_mon + 1;
178 dt.day = t.tm_mday;
179 dt.hour = t.tm_hour;
180 dt.minute = t.tm_min;
181 dt.second = t.tm_sec;
182 return dt;
183 }
◆ from_zoned()
static offset_datetime cpptoml::offset_datetime::from_zoned |
( |
const tm & |
t | ) |
|
|
inlinestatic |
Definition at line 153 of file cpptoml.h.
153 {
154 offset_datetime dt;
155 dt.year = t.tm_year + 1900;
156 dt.month = t.tm_mon + 1;
157 dt.day = t.tm_mday;
158 dt.hour = t.tm_hour;
159 dt.minute = t.tm_min;
160 dt.second = t.tm_sec;
161
162 char buf[16];
163 strftime(buf, 16, "%z", &t);
164
165 int offset = std::stoi(buf);
166 dt.hour_offset = offset / 100;
167 dt.minute_offset = offset % 100;
168 return dt;
169 }
The documentation for this struct was generated from the following file:
- /home/gitlab-runner/scratch/builds/oxpnswJ6/1/aia/m-AIA/m-AIA/src/IO/cpptoml.h