forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimezone.blade.php
More file actions
76 lines (65 loc) · 3.6 KB
/
timezone.blade.php
File metadata and controls
76 lines (65 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<div wire:poll.1s>
<x-slot name="header">
<header>
<div>
<h1 class="text-xl font-bold tracking-tight text-gray-950 sm:text-2xl">Debug Time Zone - {{ config('app.name') }}</h1>
<p class="mt-1 text-sm font-medium">
The purpose of this page is to help debut the current issues around time zones and local time. The table below displays an output of the applications current configuration.
</p>
</div>
</header>
</x-slot>
<div class="space-y-6">
<div class="overflow-hidden bg-white shadow sm:rounded-md">
<div class="p-4 bg-white border-b border-gray-200 sm:px-6">
<h3 class="text-base font-semibold leading-6 text-gray-900">Timezone</h3>
</div>
<ul role="list" class="divide-y divide-gray-200">
<li class="px-4 py-4 sm:px-6">
<p class="text-sm font-medium text-gray-900">PHP time zone</p>
<p class="text-sm text-gray-500 truncate">{{ date_default_timezone_get() }}</p>
</li>
<li class="px-4 py-4 sm:px-6">
<p class="text-sm font-medium text-gray-900">App time zone</p>
<p class="text-sm text-gray-500 truncate">{{ config('app.timezone') }}</p>
</li>
<li class="px-4 py-4 sm:px-6">
<p class="text-sm font-medium text-gray-900">Settings time zone</p>
<p class="text-sm text-gray-500 truncate">{{ $settings['timezone'] }} ({{ \Carbon\Carbon::create($settings['timezone'])->format('P') }})</p>
</li>
</ul>
</div>
<div class="overflow-hidden bg-white shadow sm:rounded-md">
<div class="p-4 bg-white border-b border-gray-200 sm:px-6">
<h3 class="text-base font-semibold leading-6 text-gray-900">Time</h3>
</div>
<ul role="list" class="divide-y divide-gray-200">
<li class="px-4 py-4 sm:px-6">
<p class="text-sm font-medium text-gray-900">UTC time</p>
<p class="text-sm text-gray-500 truncate">{{ \Carbon\Carbon::now() }}</p>
</li>
<li class="px-4 py-4 sm:px-6">
<p class="text-sm font-medium text-gray-900">Local time</p>
<p class="text-sm text-gray-500 truncate">{{ \Carbon\Carbon::now()->timezone($settings['timezone'] ?? 'UTC') }}</p>
</li>
</ul>
</div>
@isset($latest)
<div class="overflow-hidden bg-white shadow sm:rounded-md">
<div class="p-4 bg-white border-b border-gray-200 sm:px-6">
<h3 class="text-base font-semibold leading-6 text-gray-900">Latest result</h3>
</div>
<ul role="list" class="divide-y divide-gray-200">
<li class="px-4 py-4 sm:px-6">
<p class="text-sm font-medium text-gray-900">Latest result ran at</p>
<p class="text-sm text-gray-500 truncate">{{ $latest->created_at->timezone($settings['db_has_timezone'] ? null : $settings['timezone'] ?? 'UTC')->format('M. jS, Y h:i:s') }}</p>
</li>
<li class="px-4 py-4 sm:px-6">
<p class="text-sm font-medium text-gray-900">Diff for humans</p>
<p class="text-sm text-gray-500 truncate">{{ $latest->created_at->diffForHumans() }}</p>
</li>
</ul>
</div>
@endisset
</div>
</div>