Closed lpil closed 1 year ago
I did some digging and it seems there are two use cases for a naive datetime type:
The first use case doesn't apply to birl
because it doesn't have a timezone database yet so the developer has complete control over offsets. And if their use case does not involve offsets, they can just ignore the fact that offsets exist!
The second use case can be easily handled by validating datetime values using the get_offset
function.
Of course I may have missed something.
Hello!
Chatting with @nicd today about datetime libraries and he raised a good point about the Elixir date time module- it provides a NaiveDateTime struct in addition to the others.
This functionality is very useful, I think there's something to gain here. I'm not entirely sure what the ideal API should be, but it could be good to explore.
Cheers, Louis