1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-08 07:15:23 +02:00

refactor(edge/updates): sync changes from EE [EE-4288] (#7726)

This commit is contained in:
Chaim Lev-Ari 2022-12-01 08:40:52 +02:00 committed by GitHub
parent 4fee359247
commit 82e9e2a895
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
80 changed files with 1099 additions and 1892 deletions

View file

@ -37,13 +37,18 @@ export function humanize(bytes, round, base) {
return filesize(bytes, { base: base, round: round });
}
}
export const TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
export function isoDateFromTimestamp(timestamp) {
return moment.unix(timestamp).format('YYYY-MM-DD HH:mm:ss');
return moment.unix(timestamp).format(TIME_FORMAT);
}
export function isoDate(date) {
return moment(date).format('YYYY-MM-DD HH:mm:ss');
return moment(date).format(TIME_FORMAT);
}
export function parseIsoDate(date) {
return moment(date, TIME_FORMAT).toDate();
}
export function getPairKey(pair, separator) {