Skip to content

[BUG] modules.pytz.timezone() is case-insensitive in dbt Core, but case-sensitive in the dbt Fusion engine #143

@joellabes

Description

@joellabes

Describe the bug

{{ modules.datetime.datetime.now().astimezone(modules.pytz.timezone("pacific/auckland")) }}
dbt1501: Macro error: invalid argument: Invalid timezone name: pacific/auckland
(in models/example/my_first_model.sql:1)
  --> models/example/my_first_model.sql:1:59

What version of dbt Fusion is this bug in? (find out by running dbt --version)
dbt-fusion 2.0.0-beta.14

Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.

  • YES
  • NO

To Reproduce
Open this workspace and follow the instructions in the README.

TLDR: Make a model with above contents, run dbt parse.

Expected behavior
This to be correctly handled, to retain compatibility with Core

Workaround

Use Pacific/Auckland instead of pacific/auckland.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdiscrepancydiscrepancy between the dbt Fusion Engine and dbt Corehas-reproHas a reproducible example

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions