potiuk commented on code in PR #58888:
URL: https://github.com/apache/airflow/pull/58888#discussion_r2578960792


##########
shared/timezones/src/airflow_shared/timezones/timezone.py:
##########
@@ -305,3 +295,14 @@ def from_timestamp(timestamp: int | float, tz: str | 
FixedTimezone | Timezone =
             tz = local_timezone()
         result = result.in_timezone(tz)
     return result
+
+
+try:

Review Comment:
   That would need a class or global to store it of course, maybe there is a 
`nicer` way of doing it - but the principle should stay - no `configuration` is 
actually needed to be used by timezone - all you need is to pass the 
`default_timezone` from the user of the timezone library - and the user can 
retrieve it in any way they want.
   
   For example In task-sdk - IDEALLY - the `default-timezone` should be 
retrieved via task-sdk insternal API from the server - that would also remove 
the need of `task-sdk` having it configured and read airflow-configuration for 
that (possibly similar approach could be also done for other configuraiton 
options - which would eventually mean that task-sdk does not need 
"airflow-core"  configuration at all - and it does not need `airflow.cfg` or 
`AIRFLOW__` variables **AT ALL** (except task-sdk specific configuration)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to