fix(polymarket-browse): add --timezone CLI argument for display timezone #31

Closed
shoko wants to merge 0 commits from fix/16-timezone-config into master
Owner

Summary

  • Add --timezone CLI argument (default: UTC+7)
  • Supports UTC+X and UTC-X format (e.g., UTC+7, UTC-5)
  • Module-level _DISPLAY_TZ controls all time display

Changes

  • parse_timezone() function for timezone parsing
  • --timezone argument in CLI
  • get_header_date() and _get_time_data() use _DISPLAY_TZ
  • TestTimezoneParsing unit tests (5 tests)
  • SKILL.md updated

Testing

75/75 tests passing

## Summary - Add `--timezone` CLI argument (default: UTC+7) - Supports UTC+X and UTC-X format (e.g., UTC+7, UTC-5) - Module-level _DISPLAY_TZ controls all time display ## Changes - `parse_timezone()` function for timezone parsing - `--timezone` argument in CLI - `get_header_date()` and `_get_time_data()` use _DISPLAY_TZ - `TestTimezoneParsing` unit tests (5 tests) - SKILL.md updated ## Testing 75/75 tests passing
shoko added 1 commit 2026-03-26 20:08:31 +01:00
- Add parse_timezone() function supporting UTC+X format
- Add --timezone argument (default: UTC+7)
- Module-level _DISPLAY_TZ controls all time display formatting
- get_header_date() and _get_time_data() use _DISPLAY_TZ
- Add TestTimezoneParsing unit tests
- Update SKILL.md documentation
shoko reviewed 2026-03-27 01:51:01 +01:00
shoko left a comment
Author
Owner

Review requested

Review requested
shoko added the need review label 2026-03-27 01:52:35 +01:00
Collaborator

I have a question, is it better to use UTC+7 format or is it better to use Asia/Jakarta format. what are the tradeoff?

I have a question, is it better to use UTC+7 format or is it better to use Asia/Jakarta format. what are the tradeoff?
han added need clarification and removed need review labels 2026-03-27 01:56:13 +01:00
Author
Owner

Tradeoffs: UTC+7 vs Asia/Jakarta

Aspect UTC+7 Asia/Jakarta
Clarity Shows offset, not location Shows location name
DST handling Fixed offset, no DST IANA handles DST automatically
Readability Familiar to developers More descriptive
Edge cases None DST changes twice/year
Implementation Simple arithmetic ZoneInfo parsing needed

Recommendation: UTC+7 (current approach)

Reasons:

  1. Simplicity - No external dependencies (ZoneInfo not available in Python 3.14)
  2. Polymarket uses UTC internally - Most APIs work in UTC, offsets are the common convention
  3. Users in different timezones - Will likely use UTC±X anyway, not region names
  4. Current code already supports - The current implementation handles UTC+X format

Options

  • (A) Keep UTC+7 format as is — simpler, no new dependencies
  • (B) Add support for IANA names like Asia/Jakarta — requires tzdata dependency or try/except fallback

Which do you prefer?

## Tradeoffs: UTC+7 vs Asia/Jakarta | Aspect | UTC+7 | Asia/Jakarta | |--------|-------|---------------| | **Clarity** | Shows offset, not location | Shows location name | | **DST handling** | Fixed offset, no DST | IANA handles DST automatically | | **Readability** | Familiar to developers | More descriptive | | **Edge cases** | None | DST changes twice/year | | **Implementation** | Simple arithmetic | ZoneInfo parsing needed | ## Recommendation: **UTC+7 (current approach)** **Reasons:** 1. **Simplicity** - No external dependencies (ZoneInfo not available in Python 3.14) 2. **Polymarket uses UTC internally** - Most APIs work in UTC, offsets are the common convention 3. **Users in different timezones** - Will likely use UTC±X anyway, not region names 4. **Current code already supports** - The current implementation handles UTC+X format ## Options - **(A)** Keep UTC+7 format as is — simpler, no new dependencies - **(B)** Add support for IANA names like Asia/Jakarta — requires tzdata dependency or try/except fallback Which do you prefer?
shoko added need review and removed need clarification labels 2026-03-27 01:59:14 +01:00
Collaborator

lets keep UTC+7 format

lets keep UTC+7 format
han approved these changes 2026-03-27 02:00:41 +01:00
han left a comment
Collaborator

lgtm

lgtm
han added approved and removed need review labels 2026-03-27 02:00:54 +01:00
shoko closed this pull request 2026-03-27 04:09:41 +01:00

Pull request closed

Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/jujutsu-skills#31