timestampToDateTime function

DateTime timestampToDateTime(
  1. int timestamp, {
  2. bool isUtc = false,
})

时间戳转DateTime

Implementation

DateTime timestampToDateTime(int timestamp, {bool isUtc = false}) =>
    DateTime.fromMillisecondsSinceEpoch(timestamp * 1000, isUtc: isUtc);