Hey everyone| just checking if I am doing something wrong. The code below gives me time = 24:59, in Prague (GMT+1). Using Chrome.
new Intl.DateTimeFormat(
'en',
{
weekday: 'long',
month: 'long',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
hour12: false
}
).format(new Date('2020-03-11T23:59:00Z')
)
// "Thursday, March 12, 24:59"
When using the .getHours() I will get a correct value of 0 though.
new Date('2020-03-11T23:59:00Z'); // Thu Mar 12 2020 00:59:00 GMT+0100 (Central European Standard Time)
new Date('2020-03-11T23:59:00Z').getHours(); // 0
Thanks for suggestions, I didn't found any related issues about this.
Tomas
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…