Skip to content

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

Draft
weiweishi wants to merge 1 commit intosamvera:mainfrom
weiweishi:embargo-timestamp
Draft

compare entire timestamps of embargo_release_date and current time wh…#388
weiweishi wants to merge 1 commit intosamvera:mainfrom
weiweishi:embargo-timestamp

Conversation

@weiweishi
Copy link
Copy Markdown

…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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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