Skip to content

Conversation

@fertapric
Copy link
Member

@fertapric fertapric commented Aug 14, 2018

Currently DateTime.from_naive/2 always returns {:ok, datetime}.

Other option is to update DateTime.from_naive/2 to include a fallback clause that returns errors. For example, {:error, :unsupported_time_zone} when the time_zone attribute is not "Etc/UTC".

@josevalim
Copy link
Member

Good catch! I believe this will no longer be true once #7914 will be merged, so I think we should just wait until it is merged. Thanks!

@josevalim josevalim closed this Aug 14, 2018
@fertapric fertapric deleted the fertapric-remove-unused-code-on-datetime-from-naive-bang-2 branch August 14, 2018 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants