-
Notifications
You must be signed in to change notification settings - Fork 6
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
[#IP-306] Handle Cosmos unix timestamp format #145
Conversation
Example of PR titles that include pivotal stories:
Generated by 🚫 dangerJS |
console.log(nowTimestamp); | ||
console.log(aFutureOptOutEmailSwitchDate); | ||
console.log(aPastOptOutEmailSwitchDate); | ||
console.log(isBefore(nowTimestamp, aFutureOptOutEmailSwitchDate)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need these logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope I'll remove it
const anOptOutEmailSwitchDate = UTCISODateFromString.decode( | ||
"2021-07-08T23:59:59Z" | ||
).getOrElseL(() => fail("wrong date value")); | ||
const nowTimestamp = Math.floor(new Date().getTime() / 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const nowTimestamp = Math.floor(new Date().getTime() / 1000); | |
const lastUpdateTimestamp = Math.floor(new Date().getTime() / 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
List of Changes
optOutEmailSwitchDate
Motivation and Context
This solve a problem while comparing a Date made from a Unix Timestamp and another one made from Timestamp expressed in millisecond.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: