UI executions with TZ

This commit is contained in:
ayntk-ai 2024-08-16 16:02:25 +02:00
parent 4a476586df
commit 7b4182352d
No known key found for this signature in database

View File

@ -25,21 +25,7 @@
@endif
<div>Status: {{ data_get($execution, 'status') }}</div>
<div>Started At:
@php
$createdAt = data_get($execution, 'created_at', now());
$serverTimezone = $this->getServerTimezone();
ray('Created At:', $createdAt, 'Server Timezone:', $serverTimezone);
$date = new DateTime($createdAt);
if ($serverTimezone) {
try {
$date->setTimezone(new DateTimeZone($serverTimezone));
} catch (\Exception $e) {
ray('Invalid timezone:', $serverTimezone);
}
}
echo $date->format('Y-m-d H:i:s T');
@endphp
{{ $this->formatDateInServerTimezone(data_get($execution, 'created_at', now())) }}
</div>
</a>
@empty