Are time, timereceived and blocktime in UTC?

1

1

I read around about the differences between time, blocktime and timereceived, but one question remains. Although I assume all times are UTC, I haven't seen that mentioning specifically anywhere.

Does anybody know which timezone the times in the bitcoin blockchain are formatted in? And does this also account for timereceived, or is that local?

kramer65

Posted 2014-08-28T10:10:16.310

Reputation: 285

Answers

5

All timestamps are in UNIX format, that is: the number of seconds since januari 1st 1970, 0:00 UTC.

Pieter Wuille

Posted 2014-08-28T10:10:16.310

Reputation: 54 032

1

The times that you are looking at are using a format known as unix time or Epoch time. It is represented as the seconds since 00:00:00 UTC on 1st of January 1970.

Most programming languages have classes dedicated to format them into human readable times. For example in python you can use datetime.

Murch

Posted 2014-08-28T10:10:16.310

Reputation: 41 609