Time bigger than 24:00
See original GitHub issueThe bug
The .toFormat()
method gave the 24:30
time for some reason.
To Reproduce
I could not reproduce it but I see in production logs that on 2021-03-30T21:53:05.354+0000
the following line
DateTime.fromISO('2021-03-30T23:30:00.000+0000').toFormat("y-LL-dd'T'TT'.'SSSZZZ")
produced the following result 2021-03-31T24:30:00.000-0000
Actual vs Expected behavior
Actual: 2021-03-31T24:30:00.000-0000
Expected: 2021-03-31T00:30:00.000-0000
Machine info
- OS: Linux 4.14.214-160.339.amzn2.x86_64 x86_64 GNU/Linux
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Is Military Time Midnight 2400 or 0000? The Answer Here!
Although it is also possible for military personnel to use 2400 in military time as a midnight indicator, 0000 is typically preferred.
Read more >In 24 hour time, is there a functional difference between the ...
Times 00:00 and 24:00 are identical. This is a singularity (or degeneracy) in the clock … two values denote the same “time”.
Read more >24-Hour Clock Conversion Chart.pdf
In 24-hour (military) time, 12:00am is equal to 0000 and is read as “0 hundred hours”. 1:00am, or 0100, is pronounced as “zero...
Read more >How can I represent and operate on time values greater than ...
I'm currently doing some work in an application domain that uses time values greater than 24:00 to represent times after midnight that are ......
Read more >What is 2400 Military Time? Step-by-Step Conversion Guide
2400 Military Time or 2400 Hours (24-Hour time format) is equivalent to 12:00 AM in Normal Time or Standard Time (12-Hour time format)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ramos-ph that’s a known issue, but I’m pretty sure that luxon maintainers could solve it in 2 ways:
hourCycle: 'h23'
by defaulthourCycle
as a parameter based on their needsBy the way, changing locale does not fix it, they just have a different set of default values, that’s why for
en-GB
,de-DE
orpt-BR
it looks as expectedFixed in 2.0. Thanks for the report