Midnight showing up different between machines set to UTC
See original GitHub issueI have the following function:
function formatTime(ms) {
const dateTime = DateTime.fromMillis(ms)
return dateTime.toLocaleString( DateTime.TIME_24_WITH_SHORT_OFFSET)
}
When I pass in 0
I see 00:00:00 UTC
on my local machine.
However, I see 24:00:00 UTC
on my CI server.
I’ve configured my test suite to force a timezone of UTC, but one represents the midnight hour as 00
and the other as 24
. Is there a way to force one or the other?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to Handle Timezones and Synchronize Your Software ...
In this test, the goal is to check that setHours sets the date's hours and minutes to zero (midnight). I first choose a...
Read more >c# get midnight time of specific timezone in UTC
In above example I enter midnight time in +05:30 and it give UTCtime for it. Note: I am resetting my machine timezone to...
Read more >What Is UTC, and How Is It Used? - MakeUseOf
It's used as the primary time measurement by pilots—since they change time zones so quickly, referring to everything in UTC is less confusing....
Read more >How to convert UTC time to local time - Microsoft Support
Describes how to convert UTC time to local time. You can use the method that is described in this article to compare a...
Read more >Time & date: Essential concepts - W3C
Java (and many other systems) count time as the number of milliseconds since midnight (00:00 a.m.) on January 1, 1970 in UTC (less...
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
It isn’t the locale. There is a deeper bug with TZ support when it comes to negative TZ offsets. Please see #733 for an example.
I’m closing this bug as a duplicate of #726. Please post your comments there.