-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
Humanized time for metadata summary ui page does not seem to work #8409
Comments
@wangf1122 |
I have brought that pull request change into my local. Its not working. I don't think they are relevant. The issue is this ui module core-geonetwork/web-ui/src/main/resources/catalog/views/default/templates/recordView/summary.html Line 29 in b62e6c2
data-gn-humanize-time. In this case, the {{range.end.date}} is passed to the ui module with zone information. For some reason, this ui module decided to convert it to UTC which may confuse the user. It is probably make sense. But the only issue is the popup windows have the option to use original date or fromNow date. If I change the logic to have like this in the else statement. Things will work as expect to disallow fromNow To me, it is a bug in this ui module. I can make a simple pull request to fix it |
The provided pull request will probably fix citation/gmd:date. But it will not fix identification/.../beginPosition and endPosition in this issue. I checked pretty much every schema indexing calls this function core-geonetwork/web/src/main/webapp/xslt/common/index-utils.xsl Lines 632 to 633 in b62e6c2
which obtained the node of beginPosition and endPosition. So we probably should do some zone ignoring thing here. Or I suggest we can do it within the ui module with some special UI configuration to skip the UTC conversion here. core-geonetwork/web-ui/src/main/resources/catalog/components/utility/UtilityService.js Lines 587 to 589 in b62e6c2
Any idea? |
This issue can be verified from the current GN4 deployment https://apps.titellus.net/geonetwork/srv/eng/catalog.search#/metadata/da3a37ec-863f-40be-8606-0263f75a7511
I have turn off the humanized time from ui setting.
I can verify from my Edge browser's debug tool. The configuration does passed into the Javascript
core-geonetwork/web-ui/src/main/resources/catalog/components/utility/UtilityService.js
Line 583 in f65ae30
However. these two return statements do exactly the same thing
core-geonetwork/web-ui/src/main/resources/catalog/components/utility/UtilityService.js
Lines 602 to 610 in f65ae30
And they always return title as fromNow and value as converted time instead of original.
In our case, we are using the HNAP schema. It has further zoned information, we want to show the original unconverted time in the title popup instead of converted time.
The text was updated successfully, but these errors were encountered: