Originally posted by blut January 27, 2026
At the moment all datetime function relate to the current time.
I was trying to render a step-wise iteration of a token expiration date but did not find a way to implement this with datetime.
Logically:
_expireAt = current?.expireAt or ""
if _expireAt == "" or float(_expireAt) < datetime.ticks() + 60 * 60 * 24 * 3:
_expireAt = str(datetime.ticks() + 60 * 60 * 24 * 15)
-> render into %Y-%m-%d
And the last step was the one I had issues with.
Instead I created a schema and a epoch -> date object
Discussed in kcl-lang/community#25
Originally posted by blut January 27, 2026
At the moment all datetime function relate to the current time.
I was trying to render a step-wise iteration of a token expiration date but did not find a way to implement this with datetime.
Logically:
And the last step was the one I had issues with.
Instead I created a schema and a epoch -> date object