Admin\Users: Use user time zone for last_post, last_visit and registered

This commit is contained in:
Visman 2023-09-28 20:29:16 +07:00
parent 5e40fc4b3e
commit ec9e3704d8
2 changed files with 13 additions and 13 deletions

View file

@ -215,7 +215,7 @@ class Result extends Users
$key = $matches[2]; $key = $matches[2];
if (\is_string($value)) { if (\is_string($value)) {
$value = \strtotime($value . ' UTC'); $value = $this->c->Func->dateToTime($value);
} }
} elseif (\is_string($value)) { } elseif (\is_string($value)) {
$type = 'LIKE'; $type = 'LIKE';

View file

@ -272,16 +272,16 @@ class View extends Users
]; ];
$fields['last_post_1'] = [ $fields['last_post_1'] = [
'class' => ['bstart'], 'class' => ['bstart'],
'type' => 'text', 'type' => 'datetime-local',
'maxlength' => '100',
'value' => $data['last_post_1'] ?? null, 'value' => $data['last_post_1'] ?? null,
'caption' => 'Last post label', 'caption' => 'Last post label',
'step' => '1',
]; ];
$fields['last_post_2'] = [ $fields['last_post_2'] = [
'class' => ['bend'], 'class' => ['bend'],
'type' => 'text', 'type' => 'datetime-local',
'maxlength' => '100',
'value' => $data['last_post_2'] ?? null, 'value' => $data['last_post_2'] ?? null,
'step' => '1',
]; ];
$fields[] = [ $fields[] = [
'type' => 'endwrap', 'type' => 'endwrap',
@ -292,16 +292,16 @@ class View extends Users
]; ];
$fields['last_visit_1'] = [ $fields['last_visit_1'] = [
'class' => ['bstart'], 'class' => ['bstart'],
'type' => 'text', 'type' => 'datetime-local',
'maxlength' => '100',
'value' => $data['last_visit_1'] ?? null, 'value' => $data['last_visit_1'] ?? null,
'caption' => 'Last visit label', 'caption' => 'Last visit label',
'step' => '1',
]; ];
$fields['last_visit_2'] = [ $fields['last_visit_2'] = [
'class' => ['bend'], 'class' => ['bend'],
'type' => 'text', 'type' => 'datetime-local',
'maxlength' => '100',
'value' => $data['last_visit_2'] ?? null, 'value' => $data['last_visit_2'] ?? null,
'step' => '1',
]; ];
$fields[] = [ $fields[] = [
'type' => 'endwrap', 'type' => 'endwrap',
@ -312,16 +312,16 @@ class View extends Users
]; ];
$fields['registered_1'] = [ $fields['registered_1'] = [
'class' => ['bstart'], 'class' => ['bstart'],
'type' => 'text', 'type' => 'datetime-local',
'maxlength' => '100',
'value' => $data['registered_1'] ?? null, 'value' => $data['registered_1'] ?? null,
'caption' => 'Registered label', 'caption' => 'Registered label',
'step' => '1',
]; ];
$fields['registered_2'] = [ $fields['registered_2'] = [
'class' => ['bend'], 'class' => ['bend'],
'type' => 'text', 'type' => 'datetime-local',
'maxlength' => '100',
'value' => $data['registered_2'] ?? null, 'value' => $data['registered_2'] ?? null,
'step' => '1',
]; ];
$fields[] = [ $fields[] = [
'type' => 'endwrap', 'type' => 'endwrap',