aboutsummaryrefslogtreecommitdiffstats
path: root/models/ssh_key.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r--models/ssh_key.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go
index 75a0120c59..653889e488 100644
--- a/models/ssh_key.go
+++ b/models/ssh_key.go
@@ -502,8 +502,10 @@ func UpdatePublicKey(key *PublicKey) error {
// UpdatePublicKeyUpdated updates public key use time.
func UpdatePublicKeyUpdated(id int64) error {
- cnt, err := x.ID(id).Cols("updated").Update(&PublicKey{
- Updated: time.Now(),
+ now := time.Now()
+ cnt, err := x.ID(id).Cols("updated_unix").Update(&PublicKey{
+ Updated: now,
+ UpdatedUnix: now.Unix(),
})
if err != nil {
return err