Closed BerglundDaniel closed 1 week ago
The changes in this pull request introduce a new method get_makerspace_local_timezone
in api/src/service/config.py
to retrieve the local timezone for the makerspace. The download_accounting_file_route
function in api/src/shop/views.py
is updated to use this new method. Additionally, a configuration entry for MAKERSPACE_LOCAL_TIMEZONE
is added to create_env.py
, and the docker-compose.yml
file is modified to include this environment variable in the api
service and update the db2
service for MySQL compatibility.
File | Change Summary |
---|---|
api/src/service/config.py | - Added method get_makerspace_local_timezone to retrieve local timezone. - Changed exception in get_mysql_config to NameError . - Corrected indentation of return in get_admin_url . |
api/src/shop/views.py | - Updated download_accounting_file_route to use get_makerspace_local_timezone instead of instantiating ZoneInfo . |
create_env.py | - Added command-line argument --interactive for timezone input. - Added configuration entry "MAKERSPACE_LOCAL_TIMEZONE": makerspace_local_timezone to the config dictionary. |
docker-compose.yml | - Added environment variable MAKERSPACE_LOCAL_TIMEZONE to api service. - Updated db2 service command for MySQL compatibility. |
sequenceDiagram
participant User
participant API
participant Config
User->>API: Request accounting file
API->>Config: Call get_makerspace_local_timezone()
Config-->>API: Return local timezone
API->>User: Return accounting file with correct timezone
π° "In the land of code, where the bunnies play,
A timezone fix brightens the day.
With a hop and a skip, the changes are here,
Making our functions more crystal clear!
So letβs dance in the fields, with joy and cheer,
For the makerspace's time is now near!" π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Solves #467
Summary by CodeRabbit
New Features
Bug Fixes
Chores