Retro.DateTime (Retro v1.0.2) View Source

Toolkit for extending Elixir.DateTime.

This module will be deperacated when nimble_strftime is merged to Elixir.

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'