Calling `Interval.new` on `DateTime`s, changes the interval to use `NaiveDateTime`
Open
- Dominant language
- Elixir
- Stars
- 1.8k
- Forks
- 407
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to reproduce
The following code snippet:
```elixir
from = ~U[2021-01-07 00:00:00.000000Z]
until = ~U[2021-03-07 00:00:00.000000Z]
Timex.Interval.new(from: from, until: until)
```
returns:
```elixir
%Timex.Interval{
from: ~N[2021-01-07 00:00:00.000000],
left_open: false,
right_open: true,
step: [days: 1],
until: ~N[2021-03-07 00:00:00.000000]
}
```
### Description of issue
I would expect the result to keep the same type as the input ones, and not implicitly convert them to `NaiveDateTime`.
Contributor guide
Assessment
This issue has not been assessed yet.