The plan is to migrate Ecto to use the new calendar types considerably sooner than we will be able to change Logger. So at least the duality should be gone. Also, fwiw, Ecto is not really "official". It is in the elixir-lang organization but we are planning to move it elsewhere.
> You cannot be sure what timezone the datetime is in. Because by default Logger uses the localtime There is a flag that can set the timestamp to UTC. The reason I don't want to default to UTC is because that would be a very confusing behaviour for development. One option is to start including this flag in the generated config/config.exs, so folks realize they likely want to set it to true in production. *José Valim* www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D On Tue, May 3, 2016 at 1:07 AM, Lau Taarnskov <[email protected]> wrote: > There are some problems with the datetime tuples from Logger today: > > 1) Ecto uses microseconds in the fouth sub-element of the time element of > the tuple. Logger uses microseconds. I was surprised by this inconsistency. > The two kinds of tuples look exactly the same and both Logger and Ecto are > "official" Elixir pieces of software. > > 2) You cannot be sure what timezone the datetime is in. Because by default > Logger uses the localtime (which could be anything). And even if you > configure logger to use UTC, the datetime tuples do not contain this > information. > > In Elixir 2.0 could timestamps be UTC only? > > How about using DateTime structs (that will come in Elixir 1.3) instead of > the current datetime tuples? > That way you know that the timestamp is in UTC just by looking at the > data. And more importantly functions > the receive the timestamps as arguments can use this timezone data. > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/665b50f8-af2c-4654-ba93-988370fe5851%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/665b50f8-af2c-4654-ba93-988370fe5851%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4J%2Bkhw1LeBnXhiT%2Btkwxo4w%3D%3DsQ%3DhWECvp1cVGA3Jq1sw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
