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

Fix Timestamp.IsZero (#21593) #21603

Merged
merged 3 commits into from
Oct 27, 2022

Commits on Oct 26, 2022

  1. Fix Timestamp.IsZero (go-gitea#21593)

    Our implementation of `IsZero` can't work. An "empty" timestamp (= 0)
    calls `time.Unix(int64(ts), 0).IsZero()` which is always `false`. Only
    `time.Time{}.IsZero()` is `true`.
    We call this method ~~only at one place~~ and there the value
    (`UpdatedUnix`) should be always != 0 so this PR may not have
    consequences.
    
    Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
    KN4CK3R and lunny committed Oct 26, 2022
    Configuration menu
    Copy the full SHA
    7618631 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2022

  1. Configuration menu
    Copy the full SHA
    17afcb1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c89b14 View commit details
    Browse the repository at this point in the history