Wrong default timezone on DateTime.now
See original GitHub issueDateTime.Now reports the default timezone to be UTC which is not correct.
I’m in Germany so it should be UTC+1 atm.
I suspect this is due to
DateTimeZone newDefault = DateTimeZone.forTimeZone(TimeZone.getDefault()); DateTimeZone.setDefault(newDefault);
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
When the system time zone changes,python datetime ...
When the system time zone changes,python datetime.datetime.now() still return wrong time! at 2021-01-29T03:51:48, time zone changed.
Read more >date_default_timezone_set - Manual - PHP
This function returns false if the timezoneId isn't valid, or true otherwise. Examples ¶. Example #1 Getting the default timezone. <?php
Read more >datetime — Basic date and time types — Python 3.11.1 ...
The timezone class can represent simple timezones with fixed offsets from UTC, such as UTC itself or North American EST and EDT timezones....
Read more >DateTime — Elixir v1.12.3 - HexDocs
By default, it uses the default time zone database returned by Calendar.get_time_zone_database/0 ... Returns the current datetime in the provided time zone.
Read more >Converting time zone in Microsoft Power Automate
It's because of services passing dates through in varying formats or time zones. Each connector may use a different datetime format or time...
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 FreeTop 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
Top GitHub Comments
Doh, the
JodaTimeAndroid.init(context);
makes all the difference. Too bad I didn’t notice it 3 hours ago. Maybe the library could throw some kind of exception if it hasn’t been initialized?For me, this issue is fixed now.
Alright, problem solved.