Home > other >  Dart (Flutter) Wrong Time Zone- GMT is set as GMT 0 although my time zone is GMT 1. How can I chang
Dart (Flutter) Wrong Time Zone- GMT is set as GMT 0 although my time zone is GMT 1. How can I chang

Time:12-22

Code: DateTime date = DateTime.now(); print(date.timeZoneName);

Result : I/flutter (18415): GMT

The Result should be GMT 1

Thanks

CodePudding user response:

The timezone used by Dart (and Flutter) when using localtime is coming from the OS on the device the application is running on. So if the timezone does match an expected timezone, please check the timezone settings on your device and verify they match your expectation.

  • Related