b44a7db8057d — Dang Hoang Tuan (Tsuki) 2 years ago
Add nice time format for last modified table
1 files changed, 1 insertions(+), 2 deletions(-)

M helper_functions.go
M helper_functions.go +1 -2
@@ 6,7 6,6 @@ import (
 	"io/ioutil"
 	"log"
 	"strings"
-	"time"
 
 	"github.com/labstack/echo/v4"
 	"github.com/olekukonko/tablewriter"

          
@@ 22,7 21,7 @@ func displayFolder(c echo.Context, path 
 	table := tablewriter.NewWriter(tableString)
 	table.SetHeader([]string{"TYPE", "NAME", "SIZE", "LAST MODIFIED"})
 	for _, file := range files {
-		lastModified := file.ModTime().Format(time.RFC3339)
+		lastModified := file.ModTime().Format("Mon Jan _2 15:04:05 2006")
 		if file.IsDir() {
 			table.Append([]string{"DIR", file.Name(), ByteCountSI(file.Size()), lastModified})
 		} else {