Skip to content

Conversation

matt-glover
Copy link
Contributor

@matt-glover matt-glover commented Nov 25, 2023

I was running through the tutorial and wiring up an example of the in-app notifications. When I hit the signing section I copy/pasted the example code from the README and got an error:

 ** (ArgumentError) unsupported time unit. Expected :day, :hour, :minute, :second, :millisecond, :microsecond, :nanosecond, or a positive integer, got :seconds
        (elixir 1.15.7) lib/calendar/datetime.ex:1621: DateTime.add/4

... TRUNCATED...

I'm running Elixir 1.8+ where :seconds was hard deprecated.

This PR adjusts the DateTime parameter in the docs to :second which is accepted by the add function in the latest versions of Elixir (I think since 1.4?).

Copy link
Contributor

@brentjanderson brentjanderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing this! We'll get this merged and out shortly.

@brentjanderson brentjanderson merged commit e401633 into knocklabs:main Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants