1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

fix release created timezone issue

This commit is contained in:
Unknwon
2015-08-24 21:01:23 +08:00
parent 0b97290c07
commit 87152f89ba
4 changed files with 14 additions and 3 deletions

View File

@@ -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 {