aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-03-10 06:00:24 +0300
committerRblSb <msrblsb@gmail.com>2020-03-10 06:00:24 +0300
commitfe4c5fee38f5b85ca3f9d13874e7c056d832730e (patch)
treec1436e38ed73a704a95a9218ffe3a47fedc5542e /src/client
parent8079f9ea5b3f33b4093f93443550ab97593e72d4 (diff)
Use std.Date
Diffstat (limited to 'src/client')
-rw-r--r--src/client/Main.hx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx
index 8edeb8f..0db93a8 100644
--- a/src/client/Main.hx
+++ b/src/client/Main.hx
@@ -11,7 +11,6 @@ import js.html.InputElement;
import js.html.WebSocket;
import js.Browser;
import js.Browser.document;
-import js.lib.Date;
import Client.ClientData;
import Types.VideoData;
import Types.Config;
@@ -508,7 +507,7 @@ class Main {
public function serverMessage(type:Int, ?text:String, isText = true):Void {
final msgBuf = ge("#messagebuffer");
final div = document.createDivElement();
- final time = "[" + new Date().toTimeString().split(" ")[0] + "] ";
+ final time = "[" + Date.now().toString().split(" ")[1] + "] ";
switch (type) {
case 1:
div.className = "server-msg-reconnect";
@@ -560,7 +559,7 @@ class Main {
final tstamp = document.createSpanElement();
tstamp.className = "timestamp";
- if (time == null) time = "[" + new Date().toTimeString().split(" ")[0] + "] ";
+ if (time == null) time = "[" + Date.now().toString().split(" ")[1] + "] ";
tstamp.textContent = time;
final nameDiv = document.createElement("strong");
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage