Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ def under_embargo?
#permissions = permissions_doc(params[:id])
embargo_key = Hydra.config.permissions.embargo.release_date
if self[embargo_key]
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.

end
false
end
Expand Down