mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-28 17:28:15 +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;
|
||||
DATE_API const time_zone* locate_zone(const std::string& tz_name);
|
||||
DATE_API const time_zone* current_zone();
|
||||
|
||||
template <class Duration>
|
||||
class zoned_time
|
||||
@ -283,6 +285,7 @@ private:
|
||||
sys_time<duration> tp_;
|
||||
|
||||
public:
|
||||
zoned_time();
|
||||
zoned_time(const sys_time<Duration>& st);
|
||||
explicit zoned_time(const time_zone* z);
|
||||
explicit zoned_time(const std::string& name);
|
||||
@ -828,6 +831,12 @@ DATE_API const time_zone* current_zone();
|
||||
|
||||
// zoned_time
|
||||
|
||||
template <class Duration>
|
||||
inline
|
||||
zoned_time<Duration>::zoned_time()
|
||||
: zone_(locate_zone("UTC"))
|
||||
{}
|
||||
|
||||
template <class Duration>
|
||||
inline
|
||||
zoned_time<Duration>::zoned_time(const sys_time<Duration>& st)
|
||||
|
Loading…
x
Reference in New Issue
Block a user