From 469272659f6345cda888b4bbf724d2c88d89ab8f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 31 Jul 2020 12:29:08 +1000 Subject: [PATCH] fix hour graph not handling timezones west of UTC https://forums.ankiweb.net/t/statistics-bugs-after-update-2-1-5-to-2-1-29/1620 --- proto/backend.proto | 2 +- rslib/src/stats/graphs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/backend.proto b/proto/backend.proto index 51f2089b3..01346b02d 100644 --- a/proto/backend.proto +++ b/proto/backend.proto @@ -996,7 +996,7 @@ message GraphsOut { uint32 next_day_at_secs = 4; uint32 scheduler_version = 5; /// Seconds to add to UTC timestamps to get local time. - uint32 local_offset_secs = 7; + int32 local_offset_secs = 7; } message RevlogEntry { diff --git a/rslib/src/stats/graphs.rs b/rslib/src/stats/graphs.rs index 48c897d34..601de79fe 100644 --- a/rslib/src/stats/graphs.rs +++ b/rslib/src/stats/graphs.rs @@ -41,7 +41,7 @@ impl Collection { days_elapsed: timing.days_elapsed, next_day_at_secs: timing.next_day_at as u32, scheduler_version: self.sched_ver() as u32, - local_offset_secs: local_offset_secs as u32, + local_offset_secs: local_offset_secs as i32, }) } }