Working with time: Difference between revisions
From ElixirBlocks
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
https://github.com/lau/tzdata | https://github.com/lau/tzdata | ||
A useful video on setup and use: | |||
https://www.youtube.com/watch?v=UVvPXbtUJAg |
Revision as of 04:06, 12 March 2023
Get time:
DateTime.utc_now()
To convert time into human readable form:
d = DateTime.utc_now() Calendar.strftime(d, "%y-%m-%d %I:%M:%S %p")
Timezone data
Elixir does not have built in support for timezone data. You need to use this module:
A useful video on setup and use: