parse static method

DateTime parse(
  1. int timestamp
)

Implementation

static DateTime parse(int timestamp) {
  try {
    return DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
  } catch (_) {
    return DateTime.now();
  }
}