format times properly when writing indentalUserDB to file

This commit is contained in:
Iris Lightshard 2022-06-03 11:40:09 -06:00
parent 2f41f53ebf
commit b364581c6e
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398

View file

@ -241,8 +241,8 @@ func writeDB(filePath string, users map[string]*auth.User) error {
user.Name, user.Name,
user.Pass, user.Pass,
user.Session, user.Session,
user.LoginTime, user.LoginTime.Format(timeFmt),
user.LastSeen)) user.LastSeen.Format(timeFmt)))
for k, v := range user.Data { for k, v := range user.Data {
f.WriteString(fmt.Sprintf("\t\t%s: %s\n", k, v)) f.WriteString(fmt.Sprintf("\t\t%s: %s\n", k, v))
} }