Guardian generating an expired token because System.system_time != DateTime. Is this time warp?

Hey folks, a Guardian maintainer here :wave:t2:

First, I would like to clarify that neither I was the one who implemented the feature, nor do I consider myself an expert in any way.

Reading https://github.com/elixir-lang/elixir/blob/9fd97c466301baa74b309f3ea62215a12911c4d8/lib/elixir/lib/system.ex#L39-L50

It is a matter of deciding “who” defines Time. Having the OS level time could introduce problems since you can change back and forth.

Reading more about the topic at System.system_time vs System.os_time - #4 by josevalim

@josevalim perspective (which I agree), it does not matter since, in practice, we may be using UTC anyway.

I think it is prudent to fix the situation and use DateTime for this case!