mirror of
https://github.com/seigler/govobject-proposal
synced 2025-07-27 06:46:10 +00:00
bugfix: convert javascript time to unix time (/1000)
This commit is contained in:
parent
d0c3f678ce
commit
6cae0e6ec5
1 changed files with 7 additions and 2 deletions
|
@ -15,10 +15,12 @@
|
|||
|
||||
var Bitcore = require('bitcore-lib-dash');
|
||||
var apiserversocket = 'https://dev-test.dash.org:3001/';
|
||||
|
||||
//number of days to have as buffer for proposal start date before jumping to next month
|
||||
var bufferdays = 3;
|
||||
var blockheight;
|
||||
var progresstxt = "As of yet your transaction has 0 confirmations. We'll wait for 6 confirmations until you can submit your proposal. Waiting for new blocks to confirm...";
|
||||
|
||||
var gov = new Bitcore.GovObject.Proposal();
|
||||
|
||||
$(document).ready(function() {
|
||||
|
@ -395,11 +397,14 @@
|
|||
// format dates for gobject serialization
|
||||
var start_epoch = $('#start_epoch');
|
||||
var startdate = formattedDateForSuperblockHeight(start_epoch.val());
|
||||
|
||||
console.log('startdate: ' + startdate);
|
||||
this.gov.start_epoch = (new Date(startdate)) || null;
|
||||
this.gov.start_epoch = (new Date(startdate) / 1000) || null;
|
||||
|
||||
var enddate = formattedDateForSuperblockHeight(start_epoch.val(),$('#end_epoch').val());
|
||||
console.log('enddate: ' + enddate);
|
||||
this.gov.end_epoch = (new Date(enddate)) || null;
|
||||
|
||||
this.gov.end_epoch = (new Date(enddate) / 1000) || null;
|
||||
|
||||
// hidden elements
|
||||
this.gov.type = parseInt($('#type').val());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue