Last active
November 6, 2020 23:10
-
-
Save valterh4ck3r/bdb6a629fe06cf67cbfc1c0b768c2752 to your computer and use it in GitHub Desktop.
DateTime with Zone in Flutter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Assumes Instant is in your pubspec | |
import 'package:instant/instant.dart'; | |
//Super Simple! | |
DateTime myDT = DateTime.now(); //Current DateTime | |
DateTime EastCoast = dateTimeToZone(zone: "EST", datetime: myDT); //DateTime in EST zone | |
return EastCoast; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment