Skip to main content

getEpochTime

Converts a Unix timestamp (seconds since 1970-01-01 UTC) to epoch time (seconds since the Shamwari genesis block epoch).

Endpoint

GET /nxt?requestType=getEpochTime

Parameters

NameTypeRequiredDefaultDescription
unixtimelongNoCurrent Unix timeUnix timestamp in seconds

Request Example

curl "http://localhost:22024/nxt?requestType=getEpochTime&unixtime=1609459200"

Response

{
"time": 123456789,
"requestProcessingTime": 0
}

Response Fields

FieldTypeDescription
timenumberEpoch time (seconds since genesis block epoch)
requestProcessingTimenumberAPI request processing time in milliseconds

Source

GetEpochTime.java

Tags

UTILS