timeStampToTimeString1 static method

String timeStampToTimeString1(
  1. int stamp
)

年-月-日 时:分:秒 stamp 秒

Implementation

static String timeStampToTimeString1(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}")}:${twoChar("${date.second}")}";
}