Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Challenge timestamp and expiration is saved in database as localtime but incorrectly marked as GMT in challenge lists #1586

droobah opened this issue Apr 22, 2019 · 2 comments


None yet
2 participants
Copy link

commented Apr 22, 2019

What did you try to do?

Trigger challenge for token and then use /token/challenges/ to list challenges for the token. Initial timestamp for challenge trigger was Mon, 22 Apr 2019 14:01:54 CDT

What outcome did you expect?

A list of challenges for the token with a timestamp of Mon, 22 Apr 2019 14:01:54 CDT and with an expiration date 120 seconds in the future. I also would've accepted a timestamp of Mon, 22 Apr 2019 19:01:54 GMT

What outcome did you experience?

A challenge with a timestamp Mon, 22 Apr 2019 14:01:54 GMT and expiration of Mon, 22 Apr 2019 14:03:54 GMT. This was incorrectly 5 hours in the past. I was able to have the correct functionality by changing the local timezone of the server from CDT to UTC.


  • privacyIDEA Version: 3.0
  • Installation method: ubuntu packages

more details:

  • OS: Ubuntu 16.04LTS
  • Webserver: Apache2
  • Tokendatabase: Mysql

This comment has been minimized.

Copy link

commented Apr 26, 2019

Thanks for the bug-report, i can confirm this behavior. It seems we incorrectly use a different timezone for the challenge timestamps.

@plettich plettich added the bug label Apr 26, 2019


This comment has been minimized.

Copy link

commented Apr 26, 2019

Actually we already write the incorrect (local) time to the db. We should use only UTC on the server side and let the client handle the conversion.
BTW: The added Timezeone label comes from the jsonify() function in Flask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.