Refactor datetime and timezone utils

This commit is contained in:
Urtzi Alfaro
2025-10-12 23:16:04 +02:00
parent 7556a00db7
commit 96ad5c6692
11 changed files with 731 additions and 362 deletions

View File

@@ -0,0 +1,33 @@
"""
DateTime and Timezone Constants
Configuration constants for datetime and timezone operations across the bakery system.
"""
DEFAULT_TIMEZONE = "Europe/Madrid"
SUPPORTED_TIMEZONES = {
"Europe/Madrid",
"Europe/London",
"Europe/Paris",
"Europe/Berlin",
"America/New_York",
"America/Chicago",
"America/Los_Angeles",
"Asia/Tokyo",
"Asia/Shanghai",
"Australia/Sydney",
"UTC"
}
BUSINESS_HOURS_DEFAULT = {
"start_hour": 8,
"end_hour": 20,
"include_weekends": False
}
ISO_FORMAT = "%Y-%m-%dT%H:%M:%S"
ISO_FORMAT_WITH_TZ = "%Y-%m-%dT%H:%M:%S%z"
DATE_FORMAT = "%Y-%m-%d"
TIME_FORMAT = "%H:%M:%S"
DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S"