mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-07-15 05:01:41 +08:00
Fix timezone on issue deadline (#11697)
* Fix timezone on issue deadline * FormatDate Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:

committed by
GitHub

parent
cc9d2deb60
commit
bbe13b60cd
@ -75,6 +75,11 @@ func (ts TimeStamp) FormatShort() string {
|
||||
return ts.Format("Jan 02, 2006")
|
||||
}
|
||||
|
||||
// FormatDate formats a date in YYYY-MM-DD server time zone
|
||||
func (ts TimeStamp) FormatDate() string {
|
||||
return time.Unix(int64(ts), 0).String()[:10]
|
||||
}
|
||||
|
||||
// IsZero is zero time
|
||||
func (ts TimeStamp) IsZero() bool {
|
||||
return ts.AsTimeInLocation(time.Local).IsZero()
|
||||
|
Reference in New Issue
Block a user