Compare commits
1 Commits
8a23c7037f
...
v0.1.10
| Author | SHA1 | Date | |
|---|---|---|---|
| 58c029b5f2 |
7
img.go
7
img.go
@@ -14,6 +14,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"embed"
|
"embed"
|
||||||
|
_ "time/tzdata"
|
||||||
|
|
||||||
"github.com/fogleman/gg"
|
"github.com/fogleman/gg"
|
||||||
"golang.org/x/image/font"
|
"golang.org/x/image/font"
|
||||||
@@ -561,5 +562,11 @@ func formatDateFromSec(input any, layout string) string {
|
|||||||
return "[Error: unsupported time type]"
|
return "[Error: unsupported time type]"
|
||||||
}
|
}
|
||||||
t := time.UnixMilli(sec * 1000)
|
t := time.UnixMilli(sec * 1000)
|
||||||
|
|
||||||
|
loc, err := time.LoadLocation("Asia/Rangoon")
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Sprintf("[Error: unable to load TZ %v]", err)
|
||||||
|
}
|
||||||
|
t = t.In(loc)
|
||||||
return t.Format(layout)
|
return t.Format(layout)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user