mirror of
https://github.com/HowardHinnant/date.git
synced 2025-01-16 12:16:35 +08:00
Give zoned_time a default constructor
This commit is contained in:
parent
a003ad28fa
commit
d359399090
9
tz.h
9
tz.h
@ -271,6 +271,8 @@ operator<<(std::basic_ostream<CharT, Traits>& os, const local_info& r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
class time_zone;
|
class time_zone;
|
||||||
|
DATE_API const time_zone* locate_zone(const std::string& tz_name);
|
||||||
|
DATE_API const time_zone* current_zone();
|
||||||
|
|
||||||
template <class Duration>
|
template <class Duration>
|
||||||
class zoned_time
|
class zoned_time
|
||||||
@ -283,6 +285,7 @@ private:
|
|||||||
sys_time<duration> tp_;
|
sys_time<duration> tp_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
zoned_time();
|
||||||
zoned_time(const sys_time<Duration>& st);
|
zoned_time(const sys_time<Duration>& st);
|
||||||
explicit zoned_time(const time_zone* z);
|
explicit zoned_time(const time_zone* z);
|
||||||
explicit zoned_time(const std::string& name);
|
explicit zoned_time(const std::string& name);
|
||||||
@ -828,6 +831,12 @@ DATE_API const time_zone* current_zone();
|
|||||||
|
|
||||||
// zoned_time
|
// zoned_time
|
||||||
|
|
||||||
|
template <class Duration>
|
||||||
|
inline
|
||||||
|
zoned_time<Duration>::zoned_time()
|
||||||
|
: zone_(locate_zone("UTC"))
|
||||||
|
{}
|
||||||
|
|
||||||
template <class Duration>
|
template <class Duration>
|
||||||
inline
|
inline
|
||||||
zoned_time<Duration>::zoned_time(const sys_time<Duration>& st)
|
zoned_time<Duration>::zoned_time(const sys_time<Duration>& st)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user