diff options
author | Gusted <postmaster@gusted.xyz> | 2022-12-20 03:04:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 10:04:55 +0800 |
commit | 40ba750c4bf1f3f5f8dff5af57b2db4b600f237f (patch) | |
tree | 5860955fb996143a3f1091949331fee6130ff972 /routers/web/org | |
parent | 27746715842da4739d3dba2f3c423df520113a18 (diff) | |
download | gitea-40ba750c4bf1f3f5f8dff5af57b2db4b600f237f.tar.gz gitea-40ba750c4bf1f3f5f8dff5af57b2db4b600f237f.zip |
Check for zero time instant in `TimeStamp.IsZero()` (#22171)
- Currently, the 'IsZero' function for 'TimeStamp' just checks if the
unix time is zero, which is not the behavior of 'Time.IsZero()', but
Gitea is using this method in accordance with the behavior of
'Time.IsZero()'.
- Adds a new condition to check for the zero time instant.
- Fixes a bug where non-expiring GPG keys where shown as they expired on
Jan 01, 0001.
- Related https://codeberg.org/Codeberg/Community/issues/791
Before:
![image](https://user-images.githubusercontent.com/25481501/208509035-ecc5fa4a-3bd1-4fa3-beba-90875719163c.png)
After:
![image](https://user-images.githubusercontent.com/25481501/208508950-3e7f6eeb-be83-432a-89a6-d738553dafe4.png)
Diffstat (limited to 'routers/web/org')
0 files changed, 0 insertions, 0 deletions