@@ -1267,13 +1267,12 @@ void static InvalidChainFound(CBlockIndex* pindexNew)
12671267
12681268 LogPrintf (" %s: invalid block=%s height=%d log2_work=%.8g date=%s\n " , __func__,
12691269 pindexNew->GetBlockHash ().ToString (), pindexNew->nHeight ,
1270- log (pindexNew->nChainWork .getdouble ())/log (2.0 ), DateTimeStrFormat (" %Y-%m-%d %H:%M:%S" ,
1271- pindexNew->GetBlockTime ()));
1270+ log (pindexNew->nChainWork .getdouble ())/log (2.0 ), FormatISO8601DateTime (pindexNew->GetBlockTime ()));
12721271 CBlockIndex *tip = chainActive.Tip ();
12731272 assert (tip);
12741273 LogPrintf (" %s: current best=%s height=%d log2_work=%.8g date=%s\n " , __func__,
12751274 tip->GetBlockHash ().ToString (), chainActive.Height (), log (tip->nChainWork .getdouble ())/log (2.0 ),
1276- DateTimeStrFormat ( " %Y-%m-%d %H:%M:%S " , tip->GetBlockTime ()));
1275+ FormatISO8601DateTime ( tip->GetBlockTime ()));
12771276 CheckForkWarningConditions ();
12781277}
12791278
@@ -2229,7 +2228,7 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar
22292228 LogPrintf (" %s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)" , __func__,
22302229 pindexNew->GetBlockHash ().ToString (), pindexNew->nHeight , pindexNew->nVersion ,
22312230 log (pindexNew->nChainWork .getdouble ())/log (2.0 ), (unsigned long )pindexNew->nChainTx ,
2232- DateTimeStrFormat ( " %Y-%m-%d %H:%M:%S " , pindexNew->GetBlockTime ()),
2231+ FormatISO8601DateTime ( pindexNew->GetBlockTime ()),
22332232 GuessVerificationProgress (chainParams.TxData (), pindexNew), pcoinsTip->DynamicMemoryUsage () * (1.0 / (1 <<20 )), pcoinsTip->GetCacheSize ());
22342233 if (!warningMessages.empty ())
22352234 LogPrintf (" warning='%s'" , boost::algorithm::join (warningMessages, " , " ));
@@ -3856,7 +3855,7 @@ bool LoadChainTip(const CChainParams& chainparams)
38563855
38573856 LogPrintf (" Loaded best chain: hashBestChain=%s height=%d date=%s progress=%f\n " ,
38583857 chainActive.Tip ()->GetBlockHash ().ToString (), chainActive.Height (),
3859- DateTimeStrFormat ( " %Y-%m-%d %H:%M:%S " , chainActive.Tip ()->GetBlockTime ()),
3858+ FormatISO8601DateTime ( chainActive.Tip ()->GetBlockTime ()),
38603859 GuessVerificationProgress (chainparams.TxData (), chainActive.Tip ()));
38613860 return true ;
38623861}
@@ -4554,7 +4553,7 @@ void CChainState::CheckBlockIndex(const Consensus::Params& consensusParams)
45544553
45554554std::string CBlockFileInfo::ToString () const
45564555{
4557- return strprintf (" CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)" , nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat ( " %Y-%m-%d " , nTimeFirst), DateTimeStrFormat ( " %Y-%m-%d " , nTimeLast));
4556+ return strprintf (" CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)" , nBlocks, nSize, nHeightFirst, nHeightLast, FormatISO8601Date ( nTimeFirst), FormatISO8601Date ( nTimeLast));
45584557}
45594558
45604559CBlockFileInfo* GetBlockFileInfo (size_t n)
0 commit comments