[Libreoffice-bugs] [Bug 107038] online: Poco::Time* replacement with std::chrono
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat May 18 18:36:58 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=107038
--- Comment #5 from Shivansh <avihs.29 at gmail.com> ---
I have pushed the commit and sent the license statement.
For my next change, in wsd/FileServer.cpp and wsd/LOOLWSD.cpp, I am thinking of
replacing
`Poco::DateTimeFormatter::format(Poco::Timestamp(),
Poco::DateTimeFormat::HTTP_FORMAT)`
with
`char time[50];
std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
std::time_t now_c = std::chrono::system_clock::to_time_t(now);
std::tm now_tm = *std::gmtime(&now_c);
strftime(time, 50, "%a, %d %b %Y %T", &now_tm);`
Will that be ok?
If it is I am thinking of putting it into a function to avoid repetition.
Thank you.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190518/5d5cfb93/attachment.html>
More information about the Libreoffice-bugs
mailing list