mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Make time errors a thing of the past.
This commit is contained in:
@@ -31,7 +31,12 @@ NetworkOPs::NetworkOPs(boost::asio::io_service& io_service, LedgerMaster* pLedge
|
||||
|
||||
boost::posix_time::ptime NetworkOPs::getNetworkTimePT()
|
||||
{
|
||||
return boost::posix_time::second_clock::universal_time() + boost::posix_time::seconds(mTimeOffset);
|
||||
int offset;
|
||||
if (theApp->getSystemTimeOffset(offset))
|
||||
offset += mTimeOffset;
|
||||
else
|
||||
offset = mTimeOffset;
|
||||
return boost::posix_time::second_clock::universal_time() + boost::posix_time::seconds(offset);
|
||||
}
|
||||
|
||||
uint32 NetworkOPs::getNetworkTimeNC()
|
||||
|
||||
Reference in New Issue
Block a user