-
Notifications
You must be signed in to change notification settings - Fork 45
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
Unify datetime format #1389
Unify datetime format #1389
Conversation
@@ -5,6 +5,7 @@ class ApplicationEntity < Grape::Entity | |||
CUSTOM_ENTITY_OPTIONS = %i[anonymize_below anonymize_with].freeze | |||
|
|||
format_with(:eln_timestamp) do |datetime| | |||
#datetime.present? ? I18n.l(datetime, format: :eln_iso8601) : nil |
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.
Layout/LeadingCommentSpace: Missing space after #
.
b6ec01d
to
b6037ab
Compare
b6037ab
to
6c02238
Compare
@@ -20,5 +20,13 @@ class DeviceMetadataEntity < Grape::Entity | |||
expose :data_cite_created_at, documentation: { type: 'DateTime', desc: 'created_at DataCite ' } | |||
expose :data_cite_updated_at, documentation: { type: 'DateTime', desc: 'updated_at DataCite' } | |||
expose :data_cite_version, documentation: { type: 'Integer', desc: 'version at DataCite' } | |||
|
|||
def data_cite_created_at | |||
object.data_cite_created_at.present? ? && I18n.l(object.data_cite_created_at, format: :eln_timestamp) : nil |
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.
Lint/Syntax: unexpected token tAMPER
(Using Ruby 2.7 parser; configure using TargetRubyVersion
parameter, under AllCops
)
@@ -20,5 +20,13 @@ class DeviceMetadataEntity < Grape::Entity | |||
expose :data_cite_created_at, documentation: { type: 'DateTime', desc: 'created_at DataCite ' } | |||
expose :data_cite_updated_at, documentation: { type: 'DateTime', desc: 'updated_at DataCite' } | |||
expose :data_cite_version, documentation: { type: 'Integer', desc: 'version at DataCite' } | |||
|
|||
def data_cite_created_at | |||
object.data_cite_created_at.present? ? && I18n.l(object.data_cite_created_at, format: :eln_timestamp) : nil |
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.
Lint/Syntax: unexpected token tCOLON
(Using Ruby 2.7 parser; configure using TargetRubyVersion
parameter, under AllCops
)
end | ||
|
||
def data_cite_updated_at | ||
object.data_cite_updated_at.present? ? && I18n.l(object.data_cite_updated_at, format: :eln_timestamp) : nil |
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.
Lint/Syntax: unexpected token tAMPER
(Using Ruby 2.7 parser; configure using TargetRubyVersion
parameter, under AllCops
)
end | ||
|
||
def data_cite_updated_at | ||
object.data_cite_updated_at.present? ? && I18n.l(object.data_cite_updated_at, format: :eln_timestamp) : nil |
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.
Lint/Syntax: unexpected token tCOLON
(Using Ruby 2.7 parser; configure using TargetRubyVersion
parameter, under AllCops
)
6c02238
to
f176352
Compare
LCOV of commit
|
f176352
to
7ac1cc0
Compare
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.
Looks good
app/api/chemotion/message_api.rb
Outdated
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.
checked if response of endpoint is not used any more. Can confirm it.
It is harvested by MessagesFetcher.createMessage but then in further processing thrown away:
MessagePublish.js line 51
UserManagement.js line 453
LCOV of commit
|
Also use short format date llll, not LLLL.
7ac1cc0
to
ffb5661
Compare
LCOV of commit
|
* use formatDate utility to format displayed timestamps (reduce the number of 'import moment.js' ) * fix Intl time format * Entities: use default timestamp formatter * timezoneHelper: default to iso format if parsed value invalid. Also use short format date llll, not LLLL. TODO use locale ?
* use formatDate utility to format displayed timestamps (reduce the number of 'import moment.js' ) * fix Intl time format * Entities: use default timestamp formatter * timezoneHelper: default to iso format if parsed value invalid. Also use short format date llll, not LLLL. TODO use locale ?
use formatDate utility to format displayed timestamps
(reduce the number of 'import moment.js' )
Entity: return time zone in timestamp
more entities are now using the same exposure (expose_timestamp) for timestamps
shoudl resolve timezone diff in comment-feature and notification-feature