diff --git a/frontend/sandbox/sandbox.js b/frontend/sandbox/sandbox.js index 0ac054b..092a9a8 100755 --- a/frontend/sandbox/sandbox.js +++ b/frontend/sandbox/sandbox.js @@ -61,7 +61,7 @@ server = http.createServer(function(req, res) { if (pathname === "/weather/current") { res.writeHead(200, {'Content-Type': 'application/json'}); res.write(JSON.stringify({ - "time": new Date(), + "time": Math.floor(new Date().getTime()/1000), "temperature": 24, "pressure": 101361.7, "humidity": 55, diff --git a/frontend/src/views/CurrentConditions.js b/frontend/src/views/CurrentConditions.js index 700fdad..e3ec15c 100644 --- a/frontend/src/views/CurrentConditions.js +++ b/frontend/src/views/CurrentConditions.js @@ -73,6 +73,7 @@ class CurrentConditions { return (

Current Conditions

+ {Weather.current.time && (

as of {new Date(Weather.current.time*1000).toLocaleString()}

)}