Code: DateTime date = DateTime.now(); print(date.timeZoneName);
Result: I/flutter (18415): GMT
The Result should be GMT +1
Thanks
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.