How to mock current time in elixir

Or define your own function/service MyDateTime.utc_now/0 and mock it in your tests.

6 Likes