timestampToZh_yyyy_MM_dd_HH_mm_ss function

String timestampToZh_yyyy_MM_dd_HH_mm_ss(
  1. int timestamp, {
  2. bool isUtc = false,
})

时间戳转yyyy年MM月dd日 HH时mm分ss秒

Implementation

// ignore: non_constant_identifier_names
String timestampToZh_yyyy_MM_dd_HH_mm_ss(int timestamp, {bool isUtc = false}) {
  DateTime dateTime = timestampToDateTime(timestamp, isUtc: isUtc);
  return '${dateTime.year}年${twoDigits(dateTime.month)}月${twoDigits(dateTime.day)}日 ${twoDigits(dateTime.hour)}时${twoDigits(dateTime.minute)}分${twoDigits(dateTime.second)}秒';
}