mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-06-04 04:22:57 +00:00
small fix, don't worry about it
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package utils
|
||||
|
||||
import "time"
|
||||
|
||||
// FormatTime formats a time string for display
|
||||
func FormatTime(timeStr string) string {
|
||||
if timeStr == "" {
|
||||
return "Unknown"
|
||||
}
|
||||
|
||||
// Parse the time and format it nicely
|
||||
t, err := time.Parse(time.RFC3339, timeStr)
|
||||
if err != nil {
|
||||
return timeStr // Return original if parsing fails
|
||||
}
|
||||
|
||||
return t.Format("2006-01-02 15:04:05")
|
||||
}
|
||||
Reference in New Issue
Block a user