We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use case: encode/decode DateTime in a shorter variant, like Unix timestamp or so.
Example:
a = DateTime.utc_now #DateTime<2019-04-02 11:43:12.567049Z>
a |> :erlang.term_to_binary() |> Base.url_encode64() "g3QAAAANZAAKX19zdHJ1Y3RfX2QAD0VsaXhpci5EYXRlVGltZWQACGNhbGVuZGFyZAATRWxpeGlyLkNhbGVuZGFyLklTT2QAA2RheWECZAAEaG91cmELZAALbWljcm9zZWNvbmRoAmIACKcJYQZkAAZtaW51dGVhK2QABW1vbnRoYQRkAAZzZWNvbmRhDGQACnN0ZF9vZmZzZXRhAGQACXRpbWVfem9uZW0AAAAHRXRjL1VUQ2QACnV0Y19vZmZzZXRhAGQABHllYXJiAAAH42QACXpvbmVfYWJicm0AAAADVVRD"
a |> DateTime.to_unix(:microsecond) |> :erlang.term_to_binary |> Base.url_encode64() "g24HAA27XHaShQU="
As you can see, the latter is much shorter.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Use case: encode/decode DateTime in a shorter variant, like Unix timestamp or so.
Example:
As you can see, the latter is much shorter.
The text was updated successfully, but these errors were encountered: