[#node-UpdateTime]
= xref:node.adoc[node]::UpdateTime
:relfileprefix: ../
:mrdocs:

Update a block header&apos;s time field and return the new time&period;

== Synopsis

Declared in `&lt;node&sol;miner&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int64&lowbar;t
UpdateTime(
    xref:CBlockHeader.adoc[CBlockHeader]* pblock,
    xref:Consensus/Params.adoc[Consensus::Params] const& consensusParams,
    xref:CBlockIndex.adoc[CBlockIndex] const* pindexPrev);
----

== Return Value

The updated block time&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pblock*
| The block header to update&period;
| *consensusParams*
| Consensus parameters used to bound the time&period;
| *pindexPrev*
| The previous block the header builds on&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
