How do I read the time field from the json-rpc calls from bitcoind?

3

The JSON-RPC would return the time in this format "time": 1346289025. How exactly do I read it? I don't know what kind of format it is. So what time is 1346289025?

user102938

Posted 2012-09-01T02:08:26.820

Reputation: 31

Answers

3

It's unix time, the number of seconds since January 1, 1970. Your programming language probably has an easy standard way of converting it to a date.

theymos

Posted 2012-09-01T02:08:26.820

Reputation: 8 228

Depending on the version of date your computer has, you can probably convert it with date -u --date="1970-01-01 +1346289025 sec GMT", date -d @1346289025, or date -jf %s 1346289025.David Schwartz 2012-09-01T06:31:43.377