|
Title: bitcoind api time value Post by: xanatas on April 26, 2013, 07:47:47 AM Hi im new to this all but at least got it all working on my first time installed ubuntu, which i kinda like actually.
i made a successfull transaction to my running bitcoind. only thing im confused is at the moment is the time value of "listtransactions" "time" : 1366915198, "timereceived" : 1366946908 what is this? based on what, local, seconds? im not very good in programming so maybe for others its obvious. i tried google and search here. couldnt find anything. howdy! thanks- Title: Re: bitcoind api time value Post by: Serjster on April 26, 2013, 08:01:43 AM Should be Unix Timestamp
Title: Re: bitcoind api time value Post by: scintill on April 26, 2013, 08:02:01 AM Looks like Unix time (http://en.wikipedia.org/wiki/Unix_timestamp), the number of seconds since January 1, 1970. I would assume in your local time, but it may also be GMT timezone. You can convert it here (http://www.epochconverter.com/), and that may help you correlate to see if it's local time or not.
Title: Re: bitcoind api time value Post by: xanatas on April 26, 2013, 08:06:25 AM thanks! your right is unix time.
and for interested: Each block contains a Unix time timestamp. In addition to serving as a source of variation for the block hash, there are also validity checks, that make it more difficult for an adversary to manipulate the block chain. A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours. "Network-adjusted time" is the median of the timestamps returned by all nodes connected to you. Whenever a node connects to another node, it gets a UTC timestamp from it, and stores its offset from node-local UTC. The network-adjusted time is then the node-local UTC plus the median offset from all connected nodes. Network time is never adjusted more than 70 minutes from local system time, however. Bitcoin uses an unsigned integer for the timestamp, so the year 2038 problem is delayed for another 68 years. Title: Re: bitcoind api time value Post by: Kleo on April 26, 2013, 08:33:07 AM Bitcoin uses an unsigned integer for the timestamp, so the year 2038 problem is delayed for another 68 years. WOW, I would have thought Satoshi would have used a variable big enough to go 10,000years... esp after all the y2k stuff |