mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Fix protocols.io Date handling at import
This commit is contained in:
parent
8070b7f8b5
commit
838455af0d
2 changed files with 3 additions and 5 deletions
|
@ -161,9 +161,9 @@ module ProtocolsIoHelper
|
|||
timestamps = steps.map do |step|
|
||||
step['modified_on'] if step['modified_on'].present?
|
||||
end
|
||||
I18n.l(Time.at(timestamps.max), format: :full_with_tz)
|
||||
I18n.l(Time.at(timestamps.max), format: :full)
|
||||
rescue StandardError
|
||||
I18n.l(Time.at(0), format: :full_with_tz)
|
||||
I18n.l(Time.at(0), format: :full)
|
||||
end
|
||||
|
||||
# Checks so that null values are returned as zero length strings
|
||||
|
|
|
@ -60,9 +60,7 @@
|
|||
<label><%= t('protocols.import_export.import_modal.updated_at_label') %></label>
|
||||
|
||||
<% display_last_modified=eval_last_modified(@json_object['steps']) %>
|
||||
<%= f.text_field :last_modified, :value =>
|
||||
I18n.l(display_last_modified, format: :full), readonly: true, class:
|
||||
"form-control" %>
|
||||
<%= f.text_field :last_modified, :value => display_last_modified, readonly: true, class: "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue