fixup date annotation

This commit is contained in:
4cuck committed 2024-02-19 03:18:57 +01:00
1 parent 5ccc610a59
commit 03eea4015d
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ pub async fn graph(
data.push_str("Date,Healthy,Dead\n"); data.push_str("Date,Healthy,Dead\n");
for entry in healthy_data { for entry in healthy_data {
let time = Utc.timestamp_opt(entry.time,0).unwrap(); let time = Utc.timestamp_opt(entry.time,0).unwrap().format("%Y-%m-%dT%H:%M:%SZ");
writeln!(&mut data, "{},{},{}",time,entry.alive,entry.dead) writeln!(&mut data, "{},{},{}",time,entry.alive,entry.dead)
.map_err(|e|ServerError::CSV(e.to_string()))?; .map_err(|e|ServerError::CSV(e.to_string()))?;
} }
+2 -2
View File
@@ -31,13 +31,13 @@ async function loadGraph() {
g.ready(function() { g.ready(function() {
g.setAnnotations([ g.setAnnotations([
{ {
series: "Temperature", series: "Healthy",
x: "2023-05-18", x: "2023-05-18",
shortText: "G", shortText: "G",
text: "First API Change" text: "First API Change"
}, },
{ {
series: "Temperature", series: "Healthy",
x: "2024-01-24", x: "2024-01-24",
shortText: "D", shortText: "D",
text: "API Shutdown" text: "API Shutdown"