Skip to content

Fix/time converter gmt label - #58

Merged
deKibi merged 3 commits into
mainfrom
fix/time-converter-gmt-label
Jul 10, 2026
Merged

Fix/time converter gmt label#58
deKibi merged 3 commits into
mainfrom
fix/time-converter-gmt-label

Conversation

@deKibi

@deKibi deKibi commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Preserve the original GMT label in time converter responses.

  • Show GMT+3 when the user entered GMT+3
  • Display the normalized timezone label separately
  • Improve the formatting of the timezone description
  • Keep the conversion logic unchanged

@deKibi deKibi self-assigned this Jul 10, 2026
@deKibi

deKibi commented Jul 10, 2026

Copy link
Copy Markdown
Owner Author

@codex please review this PR and verify that GMT inputs keep their original label in the response, while timezone normalization and conversions remain correct. Please avoid overanalyzing unrelated code.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 451b755b4e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

)
first_line_prefix = (
f"{source_datetime:%H:%M} {source_timezone} "
f"{source_datetime:%H:%M} {display_timezone} "

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include display labels in edit signatures

Now that the reply text varies based on display_timezone, the edit-dedup signature in handle_time_message still records only hour/minute and the normalized timezone_label. When an already-processed message is edited from 10:00 UTC+3 to 10:00 GMT+3 (or back), those signature fields remain identical, so is_message_signature_unchanged returns early and the bot reply keeps the old label instead of reflecting the GMT input.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I’ll include display_timezone in the edit signature and add coverage for edits between UTC+3 and GMT+3.

Comment on lines +75 to +77
display_timezone_label = (
f"{input_timezone_prefix}{label_sign}{abs(offset_hours)}"
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Preserve zero-padded GMT labels

For accepted zero-padded offset inputs such as 10:00 GMT+03, match.group("timezone") contains the user's GMT+03 label, but rebuilding the display label from the parsed integer changes the response to GMT+3. Since this change is specifically preserving the GMT label while keeping timezone_label normalized for conversion, use the matched timezone text for display_timezone_label instead of reconstructing it from offset_hours.

Useful? React with 👍 / 👎.

@deKibi
deKibi merged commit f2e3c5b into main Jul 10, 2026
4 checks passed
@deKibi
deKibi deleted the fix/time-converter-gmt-label branch July 10, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant