Closed Xpirix closed 9 months ago
Please find below the updated screenshot after fixing the displayed date in the 'Created on' column:
@Xpirix, thanks for looking at the issue! It is not clear to me why the "Created on" column displays "Nov 30, 2023" while the plugin has been created on "Nov 28, 2023".
@agiudiceandrea , Thanks for your feedback. Indeed, the plugin was uploaded on different dates in my development environment but I did not update all screenshots. Please find below the updated screenshots for all of these pages for a newly uploaded plugin:
@dimasciput Thank you.
I checked the plugin list but I noticed that the dates are in a raw format. I see that the file local_timezone.js
used in the browser is different from the one in the code. I cleared my cache but still got the same format. However, the right file is implemented in the server.
I checked the plugin list but I noticed that the dates are in a raw format
I can confirm the issue.
The local_timezone.js
(https://plugins.qgis.org/static/js/local_timezone.js) retrieved from the server is the old one:
// Replace the date with local timezone
$(".user-timezone").each(function (i) {
let localDate = toUserTimeZone($(this).text());
$(this).text(localDate);
})
function toUserTimeZone(date) {
try {
date = new Date(date);
let options = {
year: 'numeric', month: 'short', day: 'numeric',
hour: '2-digit', minute: '2-digit',
timeZoneName: 'short'
}
return date.toLocaleDateString([], options);
} catch (e) {
return date;
}
}
The response headers report: last-modified: Thu, 08 Sep 2022 18:59:37 GMT
.
Maybe a cloudflare cache issue?
I can confirm the issue.
The issue has been fixed with https://github.com/qgis/QGIS-Django/pull/335.
This fix is for the following issue:
305
In the current PR, all dates in the plugin list, the plugin details and the plugin version details use the same timezone provided by the filter
local_timezone
. In the plugin list, the date without time format is kept. A distance formatting (time since) usingmoment.min.js
is used when it doesn't exceed one day.Please find below the screenshots for these 3 pages: