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

Handle timezones or time shift #36

Closed
sppg opened this issue Jul 20, 2023 · 8 comments
Closed

Handle timezones or time shift #36

sppg opened this issue Jul 20, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@sppg
Copy link

sppg commented Jul 20, 2023

Dear Sirs,
We are very happy using this application, and we would like to ask for an improvement.
In fact, as we travel, we change the timezone and the TOTP is not working anymore, each time I had to change the date/time of the phone to get a working OTP then switch back to the local time.
Would it be possible to add an option of a timeshift in the application?
Thank you again for the great work
Best regards

@monich
Copy link
Owner

monich commented Jul 20, 2023

This is strange, I'm using QDateTime::currentMSecsSinceEpoch() to get the current time, that returns is the number of milliseconds since 1970-01-01T00:00:00 UTC which doesn't depend on the time zone, as long as local time and time zone are correct on both ends (the server and the OTP app).

In any case, per-token time shift does make sense to handle broken clock (or more likely, time zone) on the server side. That would be a nice improvement - I'll give it a shot when I have some time to spare.

@monich monich added the enhancement New feature or request label Jul 20, 2023
@sppg
Copy link
Author

sppg commented Jul 20, 2023

Thank you very much @monich for your fast response.
In fact, the timezones are not updated that regularly on sailfishos, and I had the issue twice already (as I adjust the phone's time manually).
And of course, I agree that this improvement would help also in case of wrongly set timezone on the server.
I'm ready to betatest it whenever you ask me :)
Cheers

@monich
Copy link
Owner

monich commented Jul 21, 2023

Hehe, timeshift is already in the UI, being encrypted, restored and everything... Just not being used 🙂

@monich
Copy link
Owner

monich commented Jul 21, 2023

That was easy (495c1d0)

@monich
Copy link
Owner

monich commented Jul 22, 2023

Timeshift should work in release 1.1.8

@monich monich added bug Something isn't working and removed enhancement New feature or request labels Jul 22, 2023
@sppg
Copy link
Author

sppg commented Jul 22, 2023

Thank you very much, the time I connected I found the 1.1.9 already :)

@monich
Copy link
Owner

monich commented Jul 22, 2023

Please test and if it works for you, close the issue

@sppg
Copy link
Author

sppg commented Jul 22, 2023

Works perfectly.
Thank you again

@sppg sppg closed this as completed Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants