dbt-date icon indicating copy to clipboard operation
dbt-date copied to clipboard

[BUG] Avoid using pytz for timezone parsing

Open sdebruyn opened this issue 1 year ago • 0 comments

Is this a new bug in dbt-date?

  • [x] I believe this is a new bug in dbt-date
  • [x] I have searched the existing issues, and I could not find an existing issue for this bug

I am maintaining tsql_utils, the shims for popular dbt packages such as dbt_date for all T-SQL databases. The timezones in T-SQL are a bit peculiar and they don't support the ISO timezones. This means that the supported timezones are usually not able to be parsed with pytz. In the integration tests I currently have to override get_test_dates() just to remove the usage of pytz. It would be helpful if this was split up in a submacro or if there was no usage of pytz at all.

This is also the case for the datetime macro in modules_datetime which is a bigger problem since that's not just a test :)

sdebruyn avatar Sep 08 '24 10:09 sdebruyn