Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cal::zoned_time type for timezone-aware daily scheduling #8286

Open
ibrhmkoz opened this issue Feb 3, 2025 · 0 comments
Open

Add cal::zoned_time type for timezone-aware daily scheduling #8286

ibrhmkoz opened this issue Feb 3, 2025 · 0 comments

Comments

@ibrhmkoz
Copy link

ibrhmkoz commented Feb 3, 2025

Problem Statement

EdgeDB currently lacks a native type for representing time-of-day with timezone information, which is crucial for applications that need to schedule recurring daily events across different time zones. While datetime handles timezone-aware timestamps well, it includes date information which is unnecessary for daily recurring events. The existing cal::local_time lacks timezone context.

Use Case Example

  • Sending daily reports to users in different time zones at their local 9 AM
  • Scheduling daily system maintenance during off-peak hours for different regions
  • Setting business hours for global operations
  • Configuring notification preferences for users across time zones

Current Workarounds

  1. Using datetime requires storing redundant date information
  2. Using cal::local_time loses timezone context
  3. Custom composite types combining cal::local_time and timezone strings require manual timezone handling

Proposed Solution

Add a new cal::zoned_time type that:

  • Stores time-of-day with associated timezone information
  • Supports both fixed offsets and IANA timezone names
  • Handles DST transitions appropriately
  • Integrates with existing temporal types and functions
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

No branches or pull requests

1 participant