Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadline should be a date in the future !!! publishCampaign function, it's parse time is error in cource video!!! #78

Open
cxp-13 opened this issue Jan 14, 2024 · 2 comments

Comments

@cxp-13
Copy link

cxp-13 commented Jan 14, 2024

Correct approach!!!
Math.round(new Date(campaign.deadline) / 1000)

new Date(campaign.deadline).getTime()There will be 3 more zeros!!!

@cxp-13
Copy link
Author

cxp-13 commented Jan 14, 2024

const moonLanding = new Date('2024-01-12');

// Milliseconds since Jan 1, 1970, 00:00:00.000 GMT
console.log(moonLanding.getTime());
// output: 1705017600000

@cxp-13
Copy link
Author

cxp-13 commented Jan 14, 2024

block.timestamp (uint): The timestamp of the current block, in seconds since Unix epoch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant