mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 18:05:19 +02:00
fix release created timezone issue
This commit is contained in:
parent
0b97290c07
commit
87152f89ba
4 changed files with 14 additions and 3 deletions
|
@ -10,6 +10,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-xorm/xorm"
|
||||
|
||||
"github.com/gogits/gogs/modules/git"
|
||||
)
|
||||
|
||||
|
@ -37,6 +39,13 @@ type Release struct {
|
|||
Created time.Time `xorm:"CREATED"`
|
||||
}
|
||||
|
||||
func (r *Release) AfterSet(colName string, _ xorm.Cell) {
|
||||
switch colName {
|
||||
case "created":
|
||||
r.Created = regulateTimeZone(r.Created)
|
||||
}
|
||||
}
|
||||
|
||||
// IsReleaseExist returns true if release with given tag name already exists.
|
||||
func IsReleaseExist(repoId int64, tagName string) (bool, error) {
|
||||
if len(tagName) == 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue