mirror of
https://github.com/portainer/portainer.git
synced 2025-08-07 23:05:26 +02:00
feat(edge/updates): schedule time changes [EE-5975] (#10458)
This commit is contained in:
parent
436da01bce
commit
ad5a17ac34
3 changed files with 22 additions and 13 deletions
|
@ -41,16 +41,16 @@ export function isoDateFromTimestamp(timestamp) {
|
|||
return moment.unix(timestamp).format(TIME_FORMAT);
|
||||
}
|
||||
|
||||
export function isoDate(date) {
|
||||
return moment(date).format(TIME_FORMAT);
|
||||
export function isoDate(date, format = TIME_FORMAT) {
|
||||
return moment(date).format(format);
|
||||
}
|
||||
|
||||
export function parseIsoDate(date) {
|
||||
return moment(date, TIME_FORMAT).toDate();
|
||||
export function parseIsoDate(date, format = TIME_FORMAT) {
|
||||
return moment(date, format).toDate();
|
||||
}
|
||||
|
||||
export function formatDate(date, strFormat = 'YYYY-MM-DD HH:mm:ss Z') {
|
||||
return moment(date, strFormat).format(TIME_FORMAT);
|
||||
export function formatDate(date, strFormat = 'YYYY-MM-DD HH:mm:ss Z', outFormat = TIME_FORMAT) {
|
||||
return moment(date, strFormat).format(outFormat);
|
||||
}
|
||||
|
||||
export function getPairKey(pair, separator) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue