Problem
All export filenames that include a date currently use new Date().toISOString().slice(0, 10) which always produces a UTC date. This means users in UTC+10/+11 (e.g. AEST/AEDT) can receive files stamped with yesterday's date when exporting in the evening. Additionally, no exports include a time component, making it hard to distinguish multiple exports on the same day.
Proposed Solution
- Pass the user's local timezone from the browser to the server on export requests (via a query param, e.g.
?tz=Australia/Sydney)
- Format all export timestamps as
YYYY-MM-DD HH-mm in the user's local timezone (colons replaced with hyphens for filesystem safety)
- Apply universally across all exports that currently have a date, and add timestamps to exports that currently have none
Affected Files & Locations
Server-side (date via query param ?tz=)
| File |
Route |
Current format |
server/src/routes/csv.ts:160 |
GET .../backlog/export-csv |
YYYY-MM-DD via toISOString() |
server/src/routes/timeline.ts:1214 |
GET .../timeline/export/csv |
YYYY-MM-DD via toISOString() |
Client-side (can use new Intl.DateTimeFormat directly)
| File |
Export type |
Current format |
client/src/pages/EffortReviewPage.tsx:228 |
Effort Summary/Detail CSV |
YYYY-MM-DD via toISOString() |
client/src/pages/TimelinePage.tsx:296 |
Timeline CSV |
YYYY-MM-DD via toISOString() |
client/src/pages/TimelinePage.tsx:351 |
Gantt PNG |
YYYY-MM-DD via toISOString() |
client/src/pages/ResourceProfilePage.tsx:603 |
Resource Profile CSV |
No timestamp |
client/src/pages/ResourceProfilePage.tsx:616 |
Project Export ZIP |
No timestamp |
Server-side document download
| File |
Route |
Current format |
server/src/routes/documents.ts:87 |
GET .../documents/:docId/download |
No timestamp (label only) |
Template exports (add timestamp for consistency)
| File |
Export type |
Current format |
server/src/routes/templates.ts:91 |
All templates CSV |
Static templates.csv |
server/src/routes/templates.ts:258 |
Single template CSV |
Static {slug}.csv |
Acceptance Criteria
Problem
All export filenames that include a date currently use
new Date().toISOString().slice(0, 10)which always produces a UTC date. This means users in UTC+10/+11 (e.g. AEST/AEDT) can receive files stamped with yesterday's date when exporting in the evening. Additionally, no exports include a time component, making it hard to distinguish multiple exports on the same day.Proposed Solution
?tz=Australia/Sydney)YYYY-MM-DD HH-mmin the user's local timezone (colons replaced with hyphens for filesystem safety)Affected Files & Locations
Server-side (date via query param
?tz=)server/src/routes/csv.ts:160GET .../backlog/export-csvYYYY-MM-DDviatoISOString()server/src/routes/timeline.ts:1214GET .../timeline/export/csvYYYY-MM-DDviatoISOString()Client-side (can use
new Intl.DateTimeFormatdirectly)client/src/pages/EffortReviewPage.tsx:228YYYY-MM-DDviatoISOString()client/src/pages/TimelinePage.tsx:296YYYY-MM-DDviatoISOString()client/src/pages/TimelinePage.tsx:351YYYY-MM-DDviatoISOString()client/src/pages/ResourceProfilePage.tsx:603client/src/pages/ResourceProfilePage.tsx:616Server-side document download
server/src/routes/documents.ts:87GET .../documents/:docId/downloadTemplate exports (add timestamp for consistency)
server/src/routes/templates.ts:91templates.csvserver/src/routes/templates.ts:258{slug}.csvAcceptance Criteria
formatExportTimestamp(tz?: string): stringreturnsYYYY-MM-DD HH-mmin the given IANA timezone (falls back to UTC if invalid/missing)?tz=query param and use it for the timestamptz=(Intl.DateTimeFormat().resolvedOptions().timeZone) as a query param{label} - YYYY-MM-DD HH-mm.{ext}templates - YYYY-MM-DD HH-mm.csv/{slug} - YYYY-MM-DD HH-mm.csvtoISOString()for its user-visible date/time