1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

fix for the fix - forgot to run tests

This commit is contained in:
gras 2024-04-03 21:34:41 +02:00
parent 9ebd658276
commit f8021348db

View File

@ -133,7 +133,7 @@ export class Utils {
let formattedTimestamp = timestamp.substring(0,9).replaceAll(':', '-') + timestamp.substring(9,timestamp.length); let formattedTimestamp = timestamp.substring(0,9).replaceAll(':', '-') + timestamp.substring(9,timestamp.length);
if (formattedTimestamp.indexOf("Z") > 0) { //replace Z (and what comes after the Z) with offset if (formattedTimestamp.indexOf("Z") > 0) { //replace Z (and what comes after the Z) with offset
formattedTimestamp.substring(0, formattedTimestamp.indexOf("Z")) + (offset ? offset : '+00:00'); formattedTimestamp.substring(0, formattedTimestamp.indexOf("Z")) + (offset ? offset : '+00:00');
} else if (formattedTimestamp.indexOf("+") > 0 || formattedTimestamp.indexOf("-") > 0) { //don't do anything } else if (formattedTimestamp.indexOf("+") > 0 || timestamp.substring(9,timestamp.length).indexOf("-") > 0) { //don't do anything
} else { //add offset } else { //add offset
formattedTimestamp = formattedTimestamp + (offset ? offset : '+00:00'); formattedTimestamp = formattedTimestamp + (offset ? offset : '+00:00');
} }