How to set the time for a datatime object in Elixir?

Python has the replace function to set the hour and other parts of a date.

.replace(hour = 22, minute = 0, second = 0)

Is there anything similar in Elixir?

Just figured it out:

%{dt | hour: 10, minute: 0, second: 0, microsecond: {0, 0}}
1 Like