Use 12-hour time format

This commit is contained in:
Trevor Slocum 2023-11-10 14:29:49 -08:00
parent 67b29fde0b
commit ae60cc11b9
5 changed files with 7 additions and 7 deletions

View file

@ -41,7 +41,7 @@ func parseFlags() *game.Game {
}
forceLanguage = &tag
}
game.LoadLocales(forceLanguage)
game.LoadLocale(forceLanguage)
g := game.NewGame()
g.Username = username

View file

@ -16,7 +16,7 @@ func parseFlags() *game.Game {
forceLanguage = &tag
}
}
game.LoadLocales(forceLanguage)
game.LoadLocale(forceLanguage)
return game.NewGame()
}

View file

@ -138,7 +138,7 @@ var (
)
func l(s string) {
m := time.Now().Format("15:04") + " " + s
m := time.Now().Format("3:04") + " " + s
if statusLogged {
_, _ = statusBuffer.Write([]byte("\n" + m))
_, _ = floatStatusBuffer.Write([]byte("\n" + m))
@ -152,7 +152,7 @@ func l(s string) {
}
func lg(s string) {
m := time.Now().Format("15:04") + " " + s
m := time.Now().Format("3:04") + " " + s
if gameLogged {
_, _ = gameBuffer.Write([]byte("\n" + m))
scheduleFrame()
@ -1679,7 +1679,7 @@ func randomizeByteSlice(b [][]byte) {
}
}
func LoadLocales(forceLanguage *language.Tag) error {
func LoadLocale(forceLanguage *language.Tag) error {
entries, err := assetFS.ReadDir("locales")
if err != nil {
return err

View file

@ -44,7 +44,7 @@ func init() {
if err != nil {
return
}
LoadLocales(&tag)
LoadLocale(&tag)
}
func DefaultLocale() string {

View file

@ -33,7 +33,7 @@ func main() {
go func() {
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
g.Client.Out <- append(scanner.Bytes())
g.Client.Out <- append(scanner.Bytes(), '\n')
}
}()