Development
...
Basics
Timestamps and Dates
1 min
time measurement in signum works a bit different than in javascript or any other modern programming language, i e the timestamps delivered in the nodes responses are based on the beginning of the blockchain, the https //chain signum network/block/0 so, when dealing with real world dates the timestamp of a block needs to be converted and like with amount and chainvalue a value object class is available for that also chaintime https //signum network github io/signumjs/classes/util chaintime html const {chaintime} = require("@signumjs/util"); console log('the current block timestamp is', chaintime fromdate(new date()) getchaintimestamp()) console log('the signum mainnet went live on', chaintime fromchaintimestamp(0) getdate() toutcstring(), '(local time)') console log('expressed in the epoch timestamp (1 1 1970) it was', chaintime fromchaintimestamp(0) getepoch())