Fixed LocalTime in Upload module
This commit is contained in:
@@ -39,7 +39,8 @@ class Upload extends Controller
|
||||
|
||||
// File upload location
|
||||
$location = config('app.image.dir');
|
||||
|
||||
|
||||
date_default_timezone_set("Europe/Bratislava");
|
||||
$backupdir = Carbon::now()->format('Y/m/d');
|
||||
$backupdir = sprintf($location.'/backup/%s',$backupdir);
|
||||
$thumbdir = sprintf('%s/%s', config('app.image.thumb_dir'), Carbon::now()->format('Y/m/d'));
|
||||
|
||||
@@ -80,7 +80,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'locale' => 'en',
|
||||
'locale' => 'sk_SK',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -13,12 +13,13 @@
|
||||
|
||||
Route::get('/', function () {
|
||||
$dir = public_path().'/'.config('app.image.dir').'/backup/'.date('Y/m/d');
|
||||
|
||||
|
||||
date_default_timezone_set('Europe/Bratislava');
|
||||
$files = \File::allFiles($dir);
|
||||
$items = [];
|
||||
foreach ($files as $file) {
|
||||
$pstat = stat($file);
|
||||
$time = date('Y M D H:i:s',$pstat['mtime']);
|
||||
$time = date('d.m.Y H:i:s',$pstat['mtime']);
|
||||
|
||||
$thumb_file = str_replace('backup','thumb',$file);
|
||||
$item = ['src' => str_replace($_SERVER['DOCUMENT_ROOT'], '', $file),
|
||||
|
||||
Reference in New Issue
Block a user