From 63d7062f3c114cd05122044a4f5ed3a2f3df18f3 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 28 Oct 2016 16:34:23 -0400 Subject: [PATCH] Make dates a little more user friendly --- resources/views/server/files/index.blade.php | 2 +- resources/views/server/files/list.blade.php | 22 ++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/resources/views/server/files/index.blade.php b/resources/views/server/files/index.blade.php index 34a13c308..1889d41ba 100644 --- a/resources/views/server/files/index.blade.php +++ b/resources/views/server/files/index.blade.php @@ -51,7 +51,7 @@

File Path Information

- When configuring any file paths in your server plugins or settings you should use /home/container as your base path. While your SFTP client sees the files as /public this is not true for the server process. + When configuring any file paths in your server plugins or settings you should use /home/container as your base path.
diff --git a/resources/views/server/files/list.blade.php b/resources/views/server/files/list.blade.php index f915e0ce5..a4245d6de 100644 --- a/resources/views/server/files/list.blade.php +++ b/resources/views/server/files/list.blade.php @@ -63,7 +63,16 @@ {{ $folder['entry'] }} {{ $folder['size'] }} - {{ date('m/d/y H:i:s', $folder['date']) }} + + timezone(env('APP_TIMEZONE', 'America/New_York')); ?> + @if($carbon->diffInMinutes(Carbon::now()) > 60) + {{ $carbon->format('m/d/y H:i:s') }} + @elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture()) + seconds ago + @else + {{ $carbon->diffForHumans() }} + @endif + @endforeach @foreach ($files as $file) @@ -130,7 +139,16 @@ @endif {{ $file['size'] }} - {{ date('m/d/y H:i:s', $file['date']) }} + + timezone(env('APP_TIMEZONE', 'America/New_York')); ?> + @if($carbon->diffInMinutes(Carbon::now()) > 60) + {{ $carbon->format('m/d/y H:i:s') }} + @elseif($carbon->diffInSeconds(Carbon::now()) < 5 || $carbon->isFuture()) + seconds ago + @else + {{ $carbon->diffForHumans() }} + @endif + @endforeach