Parsing time in config's `oauth2_expiry_date` failing all glab commands
### Checklist - [x] I'm using the latest version of the extension (Run `glab --version`) - Extension version: _1.55.0_ - [x] Operating system and version: _EndeavourOS rolling_ - [x] Gitlab.com or self-managed instance? _gitlab.com_ - [ ] GitLab version (if self-managed) _NA_ (Use the `version` endpoint, like this: gitlab.my-company.com/api/v4/version) - [x] I have performed `glab auth status` to check for authentication issues - [x] Run the command in debug mode (like `DEBUG=true glab mr list`) and attach any useful output ### Summary I was in CET timezone until yesterday, and now I am in IST (GMT+5:30) while travelling. Suddenly, almost all `glab` commands fails with the following error ```sh ERROR: parsing time "03 Apr 25 21:50 +0530" as "02 Jan 06 15:04 MST": cannot parse "+0530" as "MST" ``` ### Environment - OS: Linux 6.13.7-arch1-1 x86_64 - SHELL: /bin/zsh - TERM: alacritty - GLAB: glab 1.54.0 () ```sh $cat ~/.config/glab-cli/config.yml # What protocol to use when performing Git operations. Supported values: ssh, https. git_protocol: ssh # What editor glab should run when creating issues, merge requests, etc. This global config cannot be overridden by hostname. editor: # What browser glab should run when opening links. This global config cannot be overridden by hostname. browser: # Set your desired Markdown renderer style. Available options are [dark, light, notty]. To set a custom style, refer to https://github.com/charmbracelet/glamour#styles glamour_style: dark # Allow glab to automatically check for updates and notify you when there are new updates. check_update: true # Whether or not to display hyperlink escape characters when listing items like issues or merge requests. Set to TRUE to display hyperlinks in TTYs only. Force hyperlinks by setting FORCE_HYPERLINKS=1 as an environment variable. display_hyperlinks: false # Default GitLab hostname to use. host: gitlab.com # Set to true (1) to disable prompts, or false (0) to enable them. no_prompt: false # Configuration specific for GitLab instances. hosts: gitlab.com: # What protocol to use to access the API endpoint. Supported values: http, https. api_protocol: https # Configure host for API endpoint. Defaults to the host itself. api_host: gitlab.com # Your GitLab access token. To get one, read https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html token: !!null xxxx is_oauth2: "true" oauth2_refresh_token: xxxx oauth2_expiry_date: 03 Apr 25 21:50 +0530 <<<<<<<<<<<<<<<<<<<<<<<<< This is the timestamp in the error oauth2_code_verifier: "" git_protocol: ssh user: x last_update_check_timestamp: "2025-04-03T19:50:33+05:30" ``` Other: ### Steps to reproduce Probably change your timezone to IST and do something with `glab cli` ### What is the current _bug_ behavior? Almost all commands fails with `parsing time "03 Apr 25 21:50 +0530" as "02 Jan 06 15:04 MST": cannot parse "+0530" as "MST"` ### What is the expected _correct_ behavior? No error in the above commands' outputs. ### Relevant logs and/or screenshots ```sh $DEBUG=true glab auth status [git remote -v] [git config --get-regexp ^remote\..*\.glab-resolved$] gitlab.com x gitlab.com: failed to initialize api client: parsing time "03 Apr 25 21:50 +0530" as "02 Jan 06 15:04 MST": cannot parse "+0530" as "MST" ✓ Git operations for gitlab.com configured to use ssh protocol. ✓ API calls for gitlab.com are made over https protocol. ✓ REST API Endpoint: https://gitlab.com/api/v4/ ✓ GraphQL Endpoint: https://gitlab.com/api/graphql/ ✓ Token: ************************** ERROR: x could not authenticate to one or more of the configured GitLab instances. ``` ```sh $DEBUG=true glab repo list [git remote -v] [git config --get-regexp ^remote\..*\.glab-resolved$] [git remote -v] [git config --get-regexp ^remote\..*\.glab-resolved$] ERROR: parsing time "03 Apr 25 21:50 +0530" as "02 Jan 06 15:04 MST": cannot parse "+0530" as "MST" ``` ### Possible fixes Changing the timezone value in the `oauth2_expiry_date` in glab config, to `MST` gets rid of the issue temporarily. ```diff - oauth2_expiry_date: 03 Apr 25 21:50 +0530 + oauth2_expiry_date: 03 Apr 25 21:50 MST ```
issue