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

compare entire timestamps of embargo_release_date and current time wh… #388

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

weiweishi
Copy link

…en checking embargoes

Existing logic checks for date only and it may cause issue with embargo lifting, and giving false status on the embargo release date.

jcoyne
jcoyne previously requested changes Dec 15, 2016
embargo_date = Date.parse(self[embargo_key].split(/T/)[0])
return embargo_date > Date.parse(Time.now.to_s)
embargo_date = DateTime.parse(self[embargo_key])
return embargo_date > DateTime.parse(Time.now.to_s)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be DateTime.current on the right hand side?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiweishi: is that revision OK to you?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcoyne DateTime.current doesn't reflect the timezone, and the timestamp may become confusing. Sorry @atz just saw the comments.

@jrgriffiniii jrgriffiniii marked this pull request as draft October 15, 2024 14:18
@jrgriffiniii jrgriffiniii requested a review from a team October 21, 2024 15:49
@jrgriffiniii jrgriffiniii dismissed jcoyne’s stale review October 21, 2024 15:50

Stale, as this was reviewed more than 7 years ago.

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

Successfully merging this pull request may close these issues.

4 participants