If the same thing is achievable which is a single line of code, I don't 
think it would be appropriate. It can be easily achieved by  
`DateTime.shift_zone!(dt, "Etc/UTC")` 

On Thursday, 14 January 2021 19:07:30 UTC+5:30, [email protected] wrote:
>
> What do you think of adding a convenience function:
> `DateTime.to_utc(dt)`
>
> Which would be a shortcut for:
> `DateTime.shift_zone!(dt, "Etc/UTC")`
>
> As converting back to UTC might be a common need for some applications, 
> and writing systematically "Etc/UTC" is a bit ugly.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/97b1e9c1-2ea7-4cb9-97ca-29147de8cec6o%40googlegroups.com.

Reply via email to