add login log

This commit is contained in:
jyuesong
2022-01-18 10:53:52 +08:00
parent a6208ea5f2
commit 8798501737
15 changed files with 725 additions and 151 deletions

View File

@@ -8,7 +8,13 @@ class Utils {
static String formatMessageTime(int time) {
DateTime current = DateTime.now();
DateTime chatTime = DateTime.fromMillisecondsSinceEpoch(time * 1000);
DateTime chatTime;
if (time.toString().length == 10) {
chatTime = DateTime.fromMillisecondsSinceEpoch(time * 1000);
} else {
chatTime = DateTime.fromMillisecondsSinceEpoch(time);
}
if (current.year == chatTime.year) {
if (current.day == chatTime.day) {
if (chatTime.hour <= 12) {