Retro v0.2.0 Retro.DateTime View Source

Toolkit for extending Elixir.DateTime.

Link to this section Summary

Functions

Convert %DateTime{} to local time string.

Link to this section Functions

Link to this function

to_local_time_string!(date_time, opts \\ [])

View Source (since 0.1.0)

Convert %DateTime{} to local time string.

Examples

iex> Retro.DateTime.to_local_time_string(~U[2020-05-11 07:39:41.509913Z], time_zone: "Asia/Shanghai")
'2020-05-11 15:39:41'