Skip to content

Incorrect conversion of Timex.now/1 to DateTime.utc_now/1 #66

@kerryb

Description

@kerryb

Versions

  • Elixir: 1.15.2 (compiled with Erlang/OTP 26)
  • Styler: 0.8.3

Example Input

Timex.now("Europe/London")

Stacktrace / Current Behaviour

Styler converts Timex.now/1 to DateTime.utc_now/1, which expects a calendar or unit (not a timezone). This is the formatted code:

DateTime.utc_now("Europe/London")

I believe the correct conversion should be:

DateTime.now!("Europe/London")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions