[Base] Added NtSystemClock to_local for quick time conversion to current timezone
- Changed achievement reward time to local time (in UI)
This commit is contained in:
committed by
Radosław Gliński
parent
c3586bc165
commit
bcc3c3172d
@@ -91,6 +91,14 @@ struct NtSystemClock {
|
||||
return sys_time{cdp.time_since_epoch()};
|
||||
}
|
||||
|
||||
template <Domain domain_fresh_ = domain_>
|
||||
static constexpr std::enable_if_t<
|
||||
domain_fresh_ == Domain::Host,
|
||||
std::chrono::local_time<std::chrono::system_clock::duration>>
|
||||
to_local(const time_point& tp) {
|
||||
return std::chrono::current_zone()->to_local(to_sys(tp));
|
||||
}
|
||||
|
||||
template <Domain domain_fresh_ = domain_>
|
||||
static constexpr std::enable_if_t<domain_fresh_ == Domain::Host, time_point>
|
||||
from_sys(const std::chrono::system_clock::time_point& tp) {
|
||||
|
||||
Reference in New Issue
Block a user