Skip to content

Instantly share code, notes, and snippets.

@arjan
Created November 6, 2015 01:45

Revisions

  1. Arjan Scherpenisse created this gist Nov 6, 2015.
    7 changes: 7 additions & 0 deletions timex_date_json.ex
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    defimpl Poison.Encoder, for: Timex.DateTime do
    use Timex
    def encode(d, _options) do
    fmt = DateFormat.format!(d, "{ISO}")
    "\"#{fmt}\""
    end
    end