Commitb0cb618aRecorded26 Apr 2026Repositorybureau
v0.2.1: fix DST-sensitive time-utc-offset usage in tests
Message
test-bureau.sgl was using (time-utc-offset) (returns standard, non-DST offset) where (time-utc-offset-at ts) is correct (resolves to the offset at the specific timestamp, accounting for DST). Two sites updated: the 'datetime without Z treated as local time' test (line 41) and the 'round-trip consistency' test (line 53).
Pre-existing bug uncovered during the v0.2.0 bump's smoke test; under TZ=UTC the tests pass either way. Under EEST/Helsinki the fix lets the suite go 56/56 instead of 55/56.
Bumped MCP serverInfo version literal in main.sgl to match.
Changed
package.sgl | 2 +-
src/bureau/main.sgl | 2 +-
test/test-bureau.sgl | 10 ++++++----
3 files changed, 8 insertions(+), 6 deletions(-)Diff
package.sglmodified
@@ -5,7 +5,7 @@
5
6
(package 7
name: "bureau"−8
version: "0.2.0"+8
version: "0.2.1" 9
sigil: "^0.14" 10
description: "MCP server for Fastmail email and calendar" 11
url: "https://codeberg.org/sigil/bureau"src/bureau/main.sglmodified
@@ -73,7 +73,7 @@
73
;; ============================================================ 74
75
(define (run-server)−76
(let ((server (mcp-server name: "bureau" version: "0.2.0")))+76
(let ((server (mcp-server name: "bureau" version: "0.2.1"))) 77
;; Register all tool groups 78
(register-email-tools! server mcp-server-register-tool!) 79
(register-calendar-tools! server mcp-server-register-tool!)test/test-bureau.sglmodified
@@ -37,8 +37,9 @@
37
(test "datetime without Z treated as local time" 38
(let ((ts1 (parse-iso8601 "2026-03-12T09:30:00")) 39
(ts2 (parse-iso8601 "2026-03-12T09:30:00Z")))−40
;; Local time differs from UTC by the timezone offset−41
(assert-equal (- ts2 (time-utc-offset)) ts1)))+40
;; Local time differs from UTC by the timezone offset at that instant+41
;; (use -at variant so DST resolves correctly for the specific date)+42
(assert-equal (- ts2 (time-utc-offset-at ts2)) ts1))) 43
44
(test "datetime without seconds" 45
(let ((ts (parse-iso8601 "2026-03-12T14:00Z")))@@ -49,8 +50,9 @@
50
(test "round-trip consistency" 51
(let* ((ts1 (parse-iso8601 "2026-06-15T08:30:00Z")) 52
(ts2 (parse-iso8601 "2026-06-15T08:30:00")))−52
;; With Z is UTC, without Z is local time−53
(assert-equal (- ts1 (time-utc-offset)) ts2))))+53
;; With Z is UTC, without Z is local time. Use offset-at-timestamp+54
;; so DST transitions resolve correctly for the specific instant.+55
(assert-equal (- ts1 (time-utc-offset-at ts1)) ts2)))) 56
57
58
;; ============================================================