generateTimestamp method

String generateTimestamp(
  1. DateTime date
)

Generate the timestamp.

Implementation

String generateTimestamp(DateTime date) {
  final utc = date.isUtc ? date : date.toUtc();

  return (utc.millisecondsSinceEpoch ~/ 1000).toString();
}