I created an API key for myself, which Expires "in about 2 hours", but then I use the API key I just created, and it says expired.
Steps to reproduce
I think the GitLab on-premise server we are using is on UTC time and I am on EDT. If it's 10 PM local time and I choose a key to expire the next day, which means at midnight ( in 2 hours ). Gitlab will show the key expiring in 2 hours, but the GitLab server is on UTC time so the key has already expired.
What is the current bug behavior?
Gitlab shows an expiring key in the next few hours, but it's already expired.
What is the expected correct behavior?
Gitlab should prevent creating a key that would be already expired?
@dmoraBerlin It has been a long time since looking at this issue but it seems like the biggest topic is that the UI is using local time and the backend is using server time. In my opinion we should try to reflect this in the calendar picker or expiration date field. This person should not have had the option to expire a key "tomorrow" because in server time, it was already "tomorrow."
@m_gill@mroussin how'd do you feel about a simple helper text stating:
Time based off of server clock (currently 00:00 YYYY-MM-DD)
This would set expectation of what the time calculation would correctly be. This would also minimize any code conflict by having to create a new system to go between the two variables. @eduardosanz do you have any feedback from the front end perspective?
@dmoraBerlin If we were to place a header text saying it's 2022-06-10 and the calendar still shows 2022-06-09 as an option, I think we'd get another UX issue. It should be a simple time conversion between local and UTC and not necessarily a new system. Let's get @eduardosanz's thoughts - @eduardosanz would you also provide a weight based on whatever you propose?
select column_name, data_type from information_schema.columns where table_name = 'personal_access_tokens'; column_name | data_type-------------------------------------+----------------------------- id | integer user_id | integer name | character varying revoked | boolean expires_at | **date** created_at | **timestamp without time zone** updated_at | timestamp without time zone scopes | character varying impersonation | boolean token_digest | character varying expire_notification_delivered | boolean last_used_at | timestamp with time zone after_expiry_notification_delivered | boolean(13 rows)
Contributions like this are vital to help make GitLab a better product.
We would be grateful for your help in verifying whether your bug report requires further attention from the team. If you think this bug still exists, and is reproducible with the latest stable version of GitLab, please comment on this issue.
This issue has been inactive for more than 12 months now and based on the policy for inactive bugs, will be closed in 7 days.
Thanks for your contributions to make GitLab better!