timeStampToTimeString2 static method

String timeStampToTimeString2(
  1. int stamp
)

年-月-日 时:分 stamp 秒

Implementation

static String timeStampToTimeString2(int stamp) {
  DateTime date = DateTime.fromMillisecondsSinceEpoch(stamp * 1000);
  // print("${date.year},${date.month},${date.day},${date.hour},${date.minute}");
  return "${twoChar("${date.year}")}-${twoChar("${date.month}")}-${twoChar("${date.day}")} ${twoChar("${date.hour}")}:${twoChar("${date.minute}")}";
}