pastTimestamp function

String pastTimestamp({
  1. Duration ago = const Duration(hours: 1),
})

ISO-8601 timestamp for a point in the past.

Implementation

String pastTimestamp({Duration ago = const Duration(hours: 1)}) {
  return DateTime.now().toUtc().subtract(ago).toIso8601String();
}