time: convert_time gives no warning when a fall-back wall time is ambiguous

Fermée
#5,196 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
66/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
python
Domaine
backend

Piste de recherche

Start with src/time/src/mcp_server_time/server.py, where convert_time attaches the time zone to today's date and the given HH:MM; read the existing handling for nonexistent spring-forward times and the prototype in #4781. Check how the implementation can detect a repeated wall time and communicate its ambiguity. Done means fall-back times are no longer presented as a single certain conversion, while ordinary times still work.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

bug server-time v2
Problem

convert_time in src/time/src/mcp_server_time/server.py builds the source time by attaching the time zone to today's date and the given HH:MM, which always uses fold=0. On a DST fall-back day a repeated wall time (01:30 in America/New_York, for example) occurs at two instants, and the tool silently picks the earlier one. v2 already rejects nonexistent spring-forward times.

Expected

When the given time is ambiguous, the result says so, for example with a note or with both conversions, rather than presenting one answer as certain.

Prior work
  • #4781 by @Nimra3261

The PR(s) above targeted the pre-refactor code and are closed as part of the backlog triage in #4875; this issue is where the work continues, with the PR(s) as a prototype. Thank you to their authors.

Langage dominant
TypeScript
Étoiles
91.7k
Forks
11.9k
Merge moyen
3 h 30 min
PR mergées (30 j)
204

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de modelcontextprotocol/servers

Toutes les issues de modelcontextprotocol/servers

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.