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];
if (\is_string($value)) {
$value = \strtotime($value . ' UTC');
$value = $this->c->Func->dateToTime($value);
}
} elseif (\is_string($value)) {
$type = 'LIKE';

View file

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