2 Commits

Author SHA1 Message Date
7bb8778611 pump to 0.1.10 2026-09-03 09:23:58 +06:30
58c029b5f2 fix format time to MM timezone 2026-09-03 09:00:13 +06:30
2 changed files with 8 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/bash
APP_NAME="libgofunc"
VERSION="${1:-v0.1.9}"
VERSION="${1:-v0.1.10}"
OUTPUT_DIR="../assets"
BUILD_DIR="../build"

7
img.go
View File

@@ -14,6 +14,7 @@ import (
"strings"
"embed"
_ "time/tzdata"
"github.com/fogleman/gg"
"golang.org/x/image/font"
@@ -561,5 +562,11 @@ func formatDateFromSec(input any, layout string) string {
return "[Error: unsupported time type]"
}
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)
}