spike: review how the client timezone is passed to the API
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- csharp, javascript, openapi
- Área
- api, backend-api-design
Línea de trabajo
Start by reading the seven named request DTOs and their validators, then trace each endpoint’s handling of the offset and its omission behavior. Compare the web files src/api/journal.ts and src/lib/journal-utils.ts with assistant ApiModels.cs, TaskFlowApiClient.cs and Tools/ for sign or staleness issues. Done means posting the endpoint inventory, option comparison, recommendation and cost, and opening follow-up issues if a refactor is recommended.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found while reviewing the assistant-builder agent for #400 (piece 8). The client's timezone reaches the API as a bare integer, timezoneOffsetMinutes, and the meaning of that integer is written down almost nowhere. This spike looks at whether the representation should change.
What I found
- Seven request DTOs carry
int? TimezoneOffsetMinutes:AddJournalTodoDto,CarryForwardRequestDto,CreateJournalEntryDto,CreateTaskItemDto,JournalDayQueryDto,PatchTaskItemDtoandUpdateTaskItemDto. The validators bound it (CarryForwardRequestDtoValidatorsays -720 to 840, "UTC-12:00 to UTC+14:00"). - The sign convention (minutes east of UTC, so UTC-7 is -420) is stated in no code comment on the parameter. The assistant's
InputParsing.LocalNowand the web'sgetTimezoneOffsetMinutes()both produce it, and JavaScript's ownDate.getTimezoneOffset()uses the opposite sign (minutes west). The assistant agent file carried the rule as prose, which #400 cuts, so a code comment onInputParsing.LocalNowis the interim fix. - The same value is hand-copied into three places: the API DTOs, the web (
src/api/journal.tsandsrc/lib/journal-utils.ts) and the assistant (ApiModels.cs,TaskFlowApiClient.cs,Tools/). About 30 assistant tests assert the exact integer. - A single offset cannot describe a zone whose offset changes with the date (daylight saving). The offset sent is the one at the moment of the request, so a date in the past or future can be off by an hour.
- What happens when the offset is omitted is described in different places in different words, for example "UTC when omitted" in
JournalEntriesControllerand the due-date wording inPatchTaskItemDto, while the carry-forward rule in CLAUDE.md says "no UTC fallback". They may all be consistent; this spike checks.
Scope
- Inventory every endpoint that accepts the offset and record, for each, what the server does with it and what it does when the offset is missing.
- Check each client (web, assistant) for the sign convention and for any place that sends a stale or inverted value.
- Compare these options for how the client's timezone reaches the server:
- Keep the integer, document it. DTO doc comments, an OpenAPI description, and one shared definition in each client.
- A single request header or middleware (for example
X-Timezone-Offset), so DTOs stop carrying it and the rule is written once. - An IANA zone id (for example
America/Los_Angeles) converted on the server, which handles daylight saving per date. - Anything else the inventory suggests.
- For the best option, estimate the change: API, web, assistant, tests, and any migration of stored data (none expected).
- Recommend one option and say what it costs.
Acceptance criteria
- The inventory table is posted on this issue: each endpoint, what it does with the offset, and its behavior when omitted.
- Any place that sends a wrong-signed or stale offset is listed as its own bug, or the issue says none exist.
- The three options are compared against the inventory, with a recommendation.
- If a refactor is recommended, follow-up issues are opened for it; if not, the issue says what documentation to add instead.
Out of scope
- The carry-forward behavior itself (#415, #409 and #406 cover journal reliability). This issue is only about how the timezone is represented and passed.
- Changing any behavior in this spike. It produces a decision and issues.
- The interim code comment on
InputParsing.LocalNow. #400's build makes that edit.
- Lenguaje dominante
- C#
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 2 h 2 min
- PR fusionados (30 d)
- 98
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nevridge/TaskFlow
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de nevridge/TaskFlow
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
juandresrodca/AdminForge#54 ·
-
[辞書] C/C++のプリプロセッサ指令名を英字のままにするAbierto要トリアージ 辞書
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
yksr-melt/Meltype#1625 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Docs typoAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
MonoGame/docs.monogame.github.io#328 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
space-wizards/RobustToolbox#7197 ·
Los mantenedores suelen responder en 1 día
-
documentation high priority
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
lachydotmcg/capri-desktop#201 ·
Los mantenedores suelen responder en 1 día