1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-09 17:46:31 +02:00

[+] Added option dateLocale for set date and time format

This commit is contained in:
Anton Baranov
2020-03-10 13:33:03 +02:00
committed by Marco Dickert
parent 186ccc5fb4
commit 82070df2cf
2 changed files with 3 additions and 1 deletions

View File

@@ -1330,7 +1330,7 @@ function IFM(params) {
this.formatDate = function( timestamp ) {
var d = new Date( timestamp * 1000 );
return d.toLocaleString();
return d.toLocaleString(self.config.dateLocale);
};
this.getClipboardLink = function( relpath ) {

View File

@@ -23,6 +23,7 @@ class IFM {
"tmp_dir" => "",
"timezone" => "",
"forbiddenChars" => array(),
"dateLocale" => "en-US",
"language" => "@@@vars:defaultlanguage@@@",
"selfoverwrite" => 0,
@@ -75,6 +76,7 @@ class IFM {
$this->config['root_public_url'] = getenv('IFM_ROOT_PUBLIC_URL') !== false ? getenv('IFM_ROOT_PUBLIC_URL') : $this->config['root_public_url'] ;
$this->config['tmp_dir'] = getenv('IFM_TMP_DIR') !== false ? getenv('IFM_TMP_DIR') : $this->config['tmp_dir'] ;
$this->config['timezone'] = getenv('IFM_TIMEZONE') !== false ? getenv('IFM_TIMEZONE') : $this->config['timezone'] ;
$this->config['dateLocale'] = getenv('IFM_DATELOCALE') !== false ? getenv('IFM_DATELOCALE') : $this->config['dateLocale'] ;
$this->config['forbiddenChars'] = getenv('IFM_FORBIDDENCHARS') !== false ? str_split( getenv('IFM_FORBIDDENCHARS') ) : $this->config['forbiddenChars'] ;
$this->config['language'] = getenv('IFM_LANGUAGE') !== false ? getenv('IFM_LANGUAGE') : $this->config['language'] ;
$this->config['selfoverwrite'] = getenv('IFM_SELFOVERWRITE') !== false ? getenv('IFM_SELFOVERWRITE') : $this->config['selfoverwrite'] ;