hydrometric-component
Advanced tools
+2
-12
@@ -15,12 +15,2 @@ (function () { | ||
| const getUTC = now => { | ||
| var timezoneOffset = now.getTimezoneOffset() * 60000; | ||
| return now.getTime() + timezoneOffset; | ||
| } | ||
| const getLocalTime = (date, timezone) => { | ||
| const utc = getUTC(date); | ||
| return utc + (3600000 * timezones[timezone]); | ||
| } | ||
| const { stationid, stationname, timezone, sealevel, gaugemax, gaugescale, gaugeheight } = container.dataset; | ||
@@ -87,3 +77,3 @@ | ||
| const infoSealevel = createInfoItem("RELATIVE", `Primary water level is ${sealevel} m above sea level`); | ||
| const infoTime = createInfoItem("TIME", `Latest reading taken at 0:00 a.m. ${timezone.toUpperCase()}`); | ||
| const infoTime = createInfoItem("TIME", `Latest reading taken at 0:00 AM ${timezone.toUpperCase()}`); | ||
@@ -112,4 +102,4 @@ gauge.appendChild(meter); | ||
| sealevelText.innerText = `Primary water level is ${Math.round((parseFloat(sealevel) + parseFloat(res.level)) * 1000) / 1000} m above sea level`; | ||
| timeText.innerText = `Latest reading taken at ${new Date(res.date + (3600000 * timezones[timezone])).toLocaleTimeString('en-CA', { hour: '2-digit', minute:'2-digit' })} ${timezone.toUpperCase()}`; | ||
| timeText.innerText = `Latest reading taken at ${new Date(res.date).toLocaleTimeString([], { timeZone: "UTC", hour: '2-digit', minute:'2-digit' })} ${timezone.toUpperCase()}`; | ||
| }); | ||
| }()); |
+1
-1
| { | ||
| "name": "hydrometric-component", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "description": "\"\"", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
1
-50%5186
-5.23%85
-8.6%