getTimeFormat static method

String getTimeFormat(
  1. String second
)

时间戳转日期2023-5-19 21:14:33

Implementation

static String getTimeFormat(String second){
  DateTime time = DateTime.fromMicrosecondsSinceEpoch(int.parse(second));
  return time.toLocal().toString().substring(0, 16);
}