time zone: a self-hosted server can tell time in its owner's zone, the way a Cloud home does
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
The first read is createTimeZoneRoutes, where adopts is false outside Cloud homes; trace its callers and the Cloud path through useTimeZone, adoptSavedTimeZone and time-zone.json. Also find how serve --public-url chooses host mode and where TZ is read, because self-hosted must adopt while TZ wins and desktops stay unchanged. Done means PUT /api/time-zone succeeds on a self-hosted server, the saved zone drives routines and bot time, and the host-detection question is settled.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The problem
I run dusk bot on my own VPS (duskbot serve --public-url ...). The VPS clock is UTC, like most servers, but I live in Asia/Kolkata (UTC+5:30).
Only a Cloud home adopts its owner's zone. createTimeZoneRoutes gets adopts: false everywhere else, so PUT /api/time-zone answers 409 "This computer tells time in its own time zone." On a desktop that is right: the computer's clock is the person's. On a VPS it is not.
What goes wrong today:
- A
dailyroutine at 18:00 runs at 23:30 my time. - An
intervalroutine "every 15 min, Mon-Fri, 09:00-18:00" runs from 14:30 to 23:30 my time. Its window and its weekdays both follow the UTC clock. - When I ask a bot "remind me every day at 6 PM", it can make a
dailyroutine, and that fires at 23:30. - The bots' "current time" and run titles are in UTC.
cron routines with an explicit timeZone are fine, so I create everything as cron for now. But anything made by chatting, or in the routine editor with daily or interval, comes out wrong.
The only fix today is Environment=TZ=Asia/Kolkata in the systemd unit. That works, but nothing in the app says it is needed, and it does not follow me when I travel the way a Cloud home does.
What you'd like
Let a self-hosted server adopt its owner's zone with the same code path a Cloud home uses (useTimeZone, adoptSavedTimeZone, time-zone.json).
- On a self-hosted server (not a desktop),
adoptsis true, so the owner's app sends its zone and the server saves it and runs in it. - If
TZis set in the server's environment, that wins, so people who already set it see no change. - A desktop keeps today's rule: its own clock.
Anything else
- I checked the timing with dusk bot's own schedule code: with the server on UTC, the interval example above runs 5.5 hours late; with
TZ=Asia/Kolkatait matches. - I'm happy to send the PR if this shape works for you. The open question for you is how the server should know it is self-hosted and not a desktop (for example
servewith--public-url, or a flag).
- Lenguaje dominante
- TypeScript
- Estrellas
- 277
- Forks
- 27
- Merge medio
- 7 h 8 min
- PR fusionados (30 d)
- 81
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 DuskBotAI/duskbot
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/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
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
Todos los issues de DuskBotAI/duskbot
Issues similares
-
MCP tool results drop structuredContent when text is only a summaryPosiblemente ocupada @Pankaj-bit361 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
n8n-io/nod#1474 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Clean-up indicator: two polish points from the dev look (kit clock spacing, row description)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
inblockio/siwx-oidc-matrix-server#101 ·
Los mantenedores suelen responder en 1 día
-
status:needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pingdotgg/t3code#42253 · 1 comentario ·
Los mantenedores suelen responder en 1 día