mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
add ctor(local_datetime, time_offset) to offset_datetime
This commit is contained in:
@@ -368,19 +368,18 @@ struct offset_datetime
|
||||
offset_datetime(local_date d, local_time t, time_offset o)
|
||||
: date(d), time(t), offset(o)
|
||||
{}
|
||||
|
||||
offset_datetime(const local_datetime& dt, time_offset o)
|
||||
: date(dt.date), time(dt.time), offset(o)
|
||||
{}
|
||||
offset_datetime(const local_datetime& ld)
|
||||
: date(ld.date), time(ld.time), offset(get_local_offset())
|
||||
{}
|
||||
|
||||
offset_datetime(const std::chrono::system_clock::time_point& tp)
|
||||
: offset_datetime(local_datetime(tp))
|
||||
{}
|
||||
|
||||
offset_datetime(const std::time_t& t)
|
||||
: offset_datetime(local_datetime(t))
|
||||
{}
|
||||
|
||||
offset_datetime(const std::tm& t)
|
||||
: offset_datetime(local_datetime(t))
|
||||
{}
|
||||
|
||||
Reference in New Issue
Block a user