mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-29 16:14:56 +00:00
overhaul
This commit is contained in:
1 parent
94f7302972
commit
355a97bab4
453 files changed
+81845
-1243
No files matched your search
@@ -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