fix(core): use UTC date methods for slug formatting (#2944)
This commit is contained in:
parent
87b4d0f765
commit
d0b32a7a0a
@ -7,12 +7,12 @@ function formatDate(date) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const dateParsers = {
|
export const dateParsers = {
|
||||||
year: date => date.getFullYear(),
|
year: date => date.getUTCFullYear(),
|
||||||
month: date => formatDate(date.getMonth() + 1),
|
month: date => formatDate(date.getUTCMonth() + 1),
|
||||||
day: date => formatDate(date.getDate()),
|
day: date => formatDate(date.getUTCDate()),
|
||||||
hour: date => formatDate(date.getHours()),
|
hour: date => formatDate(date.getUTCHours()),
|
||||||
minute: date => formatDate(date.getMinutes()),
|
minute: date => formatDate(date.getUTCMinutes()),
|
||||||
second: date => formatDate(date.getSeconds()),
|
second: date => formatDate(date.getUTCSeconds()),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SLUG_MISSING_REQUIRED_DATE = 'SLUG_MISSING_REQUIRED_DATE';
|
export const SLUG_MISSING_REQUIRED_DATE = 'SLUG_MISSING_REQUIRED_DATE';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user