Check out example codes for "dart timestamp". It will help you in understanding the concepts better.

Code Example 1

void main() {
  print(new DateTime.now().millisecondsSinceEpoch);
}

Learn ReactJs, React Native from akashmittal.com