Skip to content

Instantly share code, notes, and snippets.

@valterh4ck3r
Last active November 6, 2020 23:10
Show Gist options
  • Save valterh4ck3r/bdb6a629fe06cf67cbfc1c0b768c2752 to your computer and use it in GitHub Desktop.
Save valterh4ck3r/bdb6a629fe06cf67cbfc1c0b768c2752 to your computer and use it in GitHub Desktop.
DateTime with Zone in Flutter
//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