Skip to content

Instantly share code, notes, and snippets.

@kasperpeulen
Last active October 27, 2020 12:41
Show Gist options
  • Save kasperpeulen/c54b5925019b62843ef9 to your computer and use it in GitHub Desktop.
Save kasperpeulen/c54b5925019b62843ef9 to your computer and use it in GitHub Desktop.
How to get a timestamp in Dart.
<!doctype html>
<html>
<head>
</head>
<body>
<script type="application/dart" src="main.dart"></script>
</body>
</html>
import 'dart:core' show DateTime, print;
main() {
DateTime dateTime = new DateTime.now();
print(dateTime);
}
name: dart.core_DateTime.now
description: |
How to get a timestamp in Dart.
tags: datetime timestamp
homepage: https://gist.github.com/kasperpeulen/c54b5925019b62843ef9
environment:
sdk: '>=1.0.0 <2.0.0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment