EN
Dart - get current UNIX timestamp in milliseconds
9 points
In this short article, we would like to show how to get current UNIX timestamp in milliseconds in Dart.
Quick solution:
xxxxxxxxxx
1
void main() {
2
var now = DateTime.now();
3
print(now.millisecondsSinceEpoch); // 1639754011451
4
}
Example output:
xxxxxxxxxx
1
1639754011451