Skip to content

Instantly share code, notes, and snippets.

@mohammedsalem97
Created March 19, 2020 23:46
Show Gist options
  • Save mohammedsalem97/3c9abcf0bf3c21769a94f6c5a955163e to your computer and use it in GitHub Desktop.
Save mohammedsalem97/3c9abcf0bf3c21769a94f6c5a955163e to your computer and use it in GitHub Desktop.
THIS FILE IS TO PLAY WITH THE DATETIME CLASS PROPERTIES
///THIS FILE IS TO PLAY WITH THE DATETIME CLASS PROPERTIES
///FIRTST WRITTEN IN 20-3-2020
void main() {
var ct = DateTime.now();
print("Egypt Now: ${ct.toLocal()}");
print("UTC TIME ZONE NOW: ${ct.toUtc()}");
print("Time zone offset in Egypt: ${ct.timeZoneOffset.inHours} hours");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment