@@ -17,7 +17,7 @@ import (
1717
1818 "code.gitea.io/gitea/modules/git"
1919 "code.gitea.io/gitea/modules/log"
20- "code.gitea.io/gitea/modules/util "
20+ "code.gitea.io/gitea/modules/timeutil "
2121
2222 "github.com/go-xorm/xorm"
2323 "github.com/keybase/go-crypto/openpgp"
@@ -27,14 +27,14 @@ import (
2727
2828// GPGKey represents a GPG key.
2929type GPGKey struct {
30- ID int64 `xorm:"pk autoincr"`
31- OwnerID int64 `xorm:"INDEX NOT NULL"`
32- KeyID string `xorm:"INDEX CHAR(16) NOT NULL"`
33- PrimaryKeyID string `xorm:"CHAR(16)"`
34- Content string `xorm:"TEXT NOT NULL"`
35- CreatedUnix util .TimeStamp `xorm:"created"`
36- ExpiredUnix util .TimeStamp
37- AddedUnix util .TimeStamp
30+ ID int64 `xorm:"pk autoincr"`
31+ OwnerID int64 `xorm:"INDEX NOT NULL"`
32+ KeyID string `xorm:"INDEX CHAR(16) NOT NULL"`
33+ PrimaryKeyID string `xorm:"CHAR(16)"`
34+ Content string `xorm:"TEXT NOT NULL"`
35+ CreatedUnix timeutil .TimeStamp `xorm:"created"`
36+ ExpiredUnix timeutil .TimeStamp
37+ AddedUnix timeutil .TimeStamp
3838 SubsKey []* GPGKey `xorm:"-"`
3939 Emails []* EmailAddress
4040 CanSign bool
@@ -51,7 +51,7 @@ type GPGKeyImport struct {
5151
5252// BeforeInsert will be invoked by XORM before inserting a record
5353func (key * GPGKey ) BeforeInsert () {
54- key .AddedUnix = util .TimeStampNow ()
54+ key .AddedUnix = timeutil .TimeStampNow ()
5555}
5656
5757// AfterLoad is invoked from XORM after setting the values of all fields of this object.
@@ -223,8 +223,8 @@ func parseSubGPGKey(ownerID int64, primaryID string, pubkey *packet.PublicKey, e
223223 KeyID : pubkey .KeyIdString (),
224224 PrimaryKeyID : primaryID ,
225225 Content : content ,
226- CreatedUnix : util .TimeStamp (pubkey .CreationTime .Unix ()),
227- ExpiredUnix : util .TimeStamp (expiry .Unix ()),
226+ CreatedUnix : timeutil .TimeStamp (pubkey .CreationTime .Unix ()),
227+ ExpiredUnix : timeutil .TimeStamp (expiry .Unix ()),
228228 CanSign : pubkey .CanSign (),
229229 CanEncryptComms : pubkey .PubKeyAlgo .CanEncrypt (),
230230 CanEncryptStorage : pubkey .PubKeyAlgo .CanEncrypt (),
@@ -301,8 +301,8 @@ func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) {
301301 KeyID : pubkey .KeyIdString (),
302302 PrimaryKeyID : "" ,
303303 Content : content ,
304- CreatedUnix : util .TimeStamp (pubkey .CreationTime .Unix ()),
305- ExpiredUnix : util .TimeStamp (expiry .Unix ()),
304+ CreatedUnix : timeutil .TimeStamp (pubkey .CreationTime .Unix ()),
305+ ExpiredUnix : timeutil .TimeStamp (expiry .Unix ()),
306306 Emails : emails ,
307307 SubsKey : subkeys ,
308308 CanSign : pubkey .CanSign (),
0 commit comments