Commit 21e4d142 authored by legoc's avatar legoc
Browse files

ZonedDateTime proposition

parent 1c33b539
......@@ -24,7 +24,9 @@ import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
......@@ -532,6 +534,9 @@ public class DataNotificationClient {
// Convert the date in seconds from 1st january 1970 to a LocalDateTime object.
ChatEvent event = new ChatEvent(owner, message, LocalDateTime.ofEpochSecond(date, 0, ZoneOffset.UTC));
ZonedDateTime zt = ZonedDateTime.of(LocalDateTime.ofEpochSecond(date, 0, ZoneOffset.UTC), ZoneId.systemDefault());
listener.onChatEvent(event);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment