mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
add login log
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user