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.