BREAKING CHANGE!: change default timezones to Istanbul (+3:00)

This commit is contained in:
Aliberk Sandıkçı 2024-01-01 19:58:56 +03:00
parent d7ff69480a
commit c8e8fb64f1
Signed by: asandikci
GPG key ID: 25C67A03B5666BC1
6 changed files with 10 additions and 10 deletions

View file

@ -67,7 +67,7 @@ class Installation extends EA_Controller
$this->instance->migrate(); $this->instance->migrate();
// Insert admin // Insert admin
$admin['timezone'] = 'UTC'; $admin['timezone'] = 'Istanbul (+3:00)'; // REVIEW is it working properly ?!
$admin['settings']['username'] = $admin['username']; $admin['settings']['username'] = $admin['username'];
$admin['settings']['password'] = $admin['password']; $admin['settings']['password'] = $admin['password'];
$admin['settings']['notifications'] = true; $admin['settings']['notifications'] = true;

View file

@ -28,15 +28,15 @@ class Timezones
/** /**
* @var string * @var string
*/ */
protected string $default = 'UTC'; protected string $default = 'Istanbul (+3:00)'; // REVIEW is it working??
/** /**
* @var array * @var array
*/ */
protected array $timezones = [ protected array $timezones = [
'UTC' => [ 'General' => [
'UTC' => 'UTC', 'General/UTC' => 'UTC',
// 'Türkiye' => 'Istanbul (+3:00)', // TODO add this line in proper way 'General/Istanbul' => 'Istanbul (+3:00)', // REVIEW is this line proper and working correctly???
], ],
'America' => [ 'America' => [
'America/Adak' => 'Adak (-10:00)', 'America/Adak' => 'Adak (-10:00)',
@ -531,7 +531,7 @@ class Timezones
*/ */
public function get_default_timezone(): string public function get_default_timezone(): string
{ {
return 'UTC'; // TODO change this to +3 in proper way return 'Istanbul (+3:00)'; // REVIEW is it working in proper way?
} }
/** /**

View file

@ -23,7 +23,7 @@ class Migration_Add_timezone_to_users extends EA_Migration
'timezone' => [ 'timezone' => [
'type' => 'VARCHAR', 'type' => 'VARCHAR',
'constraint' => '256', 'constraint' => '256',
'default' => 'UTC', 'default' => 'Istanbul (+3:00)', // REVIEW Works under migration ?
'after' => 'notes', 'after' => 'notes',
], ],
]; ];

View file

@ -172,7 +172,7 @@
<small> <small>
<?= lang('current_user') ?>: <?= lang('current_user') ?>:
<span> <span>
<?= $timezones[session('timezone', 'UTC')] ?> <?= $timezones[session('timezone', 'Istanbul (+3:00)')] ?>
</span> </span>
</small> </small>
</div> </div>

View file

@ -23,7 +23,7 @@
<?= lang('timezone') ?> <?= lang('timezone') ?>
</label> </label>
<?php component('timezone_dropdown', [ <?php component('timezone_dropdown', [
'attributes' => 'id="select-timezone" class="form-control" value="UTC"', 'attributes' => 'id="select-timezone" class="form-control" value="Istanbul (+3:00)"',
'grouped_timezones' => $grouped_timezones, 'grouped_timezones' => $grouped_timezones,
]); ?> ]); ?>
</div> </div>

View file

@ -63,7 +63,7 @@
<small> <small>
<?= lang('current_user') ?>: <?= lang('current_user') ?>:
<span> <span>
<?= $timezones[session('timezone', 'UTC')] ?> <?= $timezones[session('timezone', 'Istanbul (+3:00)')] ?>
</span> </span>
</small> </small>
</div> </div>