mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Ide: Logger now taking into consideration time zone.
git-svn-id: svn://ultimatepp.org/upp/trunk@11624 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
702b4c7ef9
commit
7db34a8da1
1 changed files with 3 additions and 1 deletions
|
|
@ -39,7 +39,9 @@ String Logger::GetCurrentTime()
|
|||
using namespace std::chrono;
|
||||
using days = duration<int, std::ratio_multiply<hours::period, std::ratio<24>>::type>;
|
||||
|
||||
auto tp = system_clock::now().time_since_epoch();
|
||||
auto now = system_clock::now();
|
||||
now += minutes(GetTimeZone());
|
||||
auto tp = now.time_since_epoch();
|
||||
|
||||
auto d = duration_cast<days>(tp); tp -= d;
|
||||
auto h = duration_cast<hours>(tp); tp -= h;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue