Drop the city time-zone table

The user only ever asks the time in his own zone, so answering other
cities was code kept in step with the weather city list for no gain.
Any named place now gets the honest "local time only" answer that was
already there for unknown cities.

Removes the 22-entry table, the lookup and the embedded tz database.
Closes Vikunja #389 — there is only one city list again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CGeSZxh1DCtRxmFVSYVGvJ
This commit is contained in:
kami
2026-07-31 14:14:18 +04:00
parent 84ba217892
commit 3dbf67f8f9
2 changed files with 14 additions and 67 deletions
+5 -6
View File
@@ -57,17 +57,16 @@ func TestReplySystemUnknownDayIsHonest(t *testing.T) {
}
// TestReplySystemClockCity — the clock arm must not answer local time for a
// question about another city (Vikunja #388). Known cities get their own zone;
// unknown places get an honest "local time only".
// question about another city (Vikunja #388). She keeps one clock, so every
// named place gets the honest "local time only" answer.
func TestReplySystemClockCity(t *testing.T) {
// 12:00 UTC — Kyiv is +03 in July, Moscow +03, London +01.
now := time.Date(2026, 7, 30, 12, 0, 0, 0, time.UTC)
h := systemHandler(now)
cases := []struct{ utterance, want string }{
{"который час", "сейчас 12 часов ровно"},
{"который час в киеве", "в Киеве сейчас 15 часов ровно"},
{"сколько времени в москве", "в Москве сейчас 15 часов ровно"},
{"который час в лондоне", "в Лондоне сейчас 13 часов ровно"},
{"который час в киеве", onlyLocalTimeReply},
{"сколько времени в москве", onlyLocalTimeReply},
{"который час в лондоне", onlyLocalTimeReply},
{"который час в бишкеке", onlyLocalTimeReply},
}
for _, c := range cases {