UTC to Local Convert DateTime with Specific format DateTime In Flutter :

import 'package:intl/intl.dart'; main(){ var dateUtc = DateTime.now().toUtc(); var strToDateTime = DateTime.parse(dateUtc.toString()); final convertLocal = strToDateTime.toLocal(); var newFormat = DateFormat("yy-MM-dd hh:mm:ss aaa"); String updatedDt = newFormat.format(convertLocal); print(dateUtc); print(convertLocal); print(updatedDt); } /* 2020-08-25 04:16:19.648581Z 2020-08-25 09:46:19.648581 20-08-25 09:46:19 AM */s
The flutter tutorial is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application
For more information about Flutter. visit www.fluttertutorial.in