Bitcoin Forum
May 27, 2024, 02:44:00 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Solution as a Time Server  (Read 92 times)
aa7356 (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 4


View Profile
April 03, 2020, 07:18:20 PM
Merited by LoyceV (2)
 #1

Hi all,

Sure at every computational system you need a clock. Bitcoin tick clock as widely published started at unix epoch time
block.nTime=1231006505

https://en.bitcoin.it/wiki/Genesis_block

My question is ..
I need to adapt a legacy system prior to unix epoch

is this script is ok? (I need a peer review)

Code:
#using Power$hell
+++++++++++++++++++++++++++++++++++++++++++++++++++++
$stopwatch = New-Object System.Diagnostics.Stopwatch
$stopwatch.Start()
$stopwatch.Stop()
$stopwatch

[Math]::Round((Get-Date).ToFileTimeUTC()/10000)

[Math]::Round((Get-Date).ToFileTime() / 10000000 - 11644473600)

<#
Where 11644473600 is the number of elapsed seconds between the
Microsoft epoch (January 1, 1601 A.D. (C.E.)) and the Unix epoch
(January 1, 1970, 12AM UTC/GMT)

https://msdn.microsoft.com/en-us/library/system.datetime.tofiletime(v=vs.110).aspx

=====> PowerShell Integrated Console <=====
#>


 
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!