Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Prints a greeting.
- void main() {
- DateTime now = new DateTime.now();
- print(now);
- print(now.isUtc);
- print(now.toLocal());
- print(now.toUtc());
- DateTime n1 = now.toUtc().add(new Duration(hours: -5));
- print(n1);
- DateTime utc = new DateTime.utc(1945, 2, 6);
- DateTime loc = new DateTime(1945, 2, 6);
- print(utc);
- print(loc);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement