Bitcoin Forum
July 05, 2024, 04:06:03 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoind api time value  (Read 521 times)
xanatas (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
April 26, 2013, 07:47:47 AM
 #1

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-
Serjster
Newbie
*
Offline Offline

Activity: 37
Merit: 0



View Profile WWW
April 26, 2013, 08:01:43 AM
 #2

Should be Unix Timestamp
scintill
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile WWW
April 26, 2013, 08:02:01 AM
 #3

Looks like Unix time, 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, and that may help you correlate to see if it's local time or not.

1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
xanatas (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
April 26, 2013, 08:06:25 AM
 #4

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.
Kleo
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
April 26, 2013, 08:33:07 AM
 #5



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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!