mirror of
https://github.com/narrrl/narl-workspace.git
synced 2026-11-03 16:41:27 +01:00
agenda: today is the workspace's day, not the browser's
The browser grouped the agenda by its own midnight and remembered that it had opened it by its own date, while the server counts due dates, mails and the diary in `WORKSPACE_TIMEZONE`. A laptop on a trip, or a browser set to UTC, showed a card as late that the morning mail called due today, and opened the agenda a second time on one workspace day or not at all. A day was also taken to be 86400 seconds, which it is not when the clocks change. The agenda answer now carries `today`: the date in the configured timezone, when it starts and ends, and when the seventh day after it ends, all from the same `day_bounds` the mails use. The browser groups by those and keys the once-a-day opening on that date. The screenshot run marks the agenda as seen under the same date.
This commit is contained in:
1 parent
a1f6f6025f
commit
0e0d21506e
7 files changed
+77
-13
No files matched your search
@@ -356,7 +356,7 @@ await send('Page.enable')
|
||||
await send('Network.enable')
|
||||
// The agenda opens itself once a day; here it opens when asked.
|
||||
await send('Page.addScriptToEvaluateOnNewDocument', {
|
||||
source: `localStorage.setItem('diary:agenda-seen', new Date().toDateString())`,
|
||||
source: `localStorage.setItem('diary:agenda-seen', new Intl.DateTimeFormat('en-CA', { timeZone: 'Europe/Berlin' }).format(new Date()))`,
|
||||
})
|
||||
|
||||
await viewport(1440, 900)
|
||||
|
||||
Reference in new issue
Block a user