mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 04:32:15 +01:00
Fixed timezone issue in PDF reports
This commit is contained in:
committed by
Constantin Graf
parent
bc9b104c3f
commit
4fb744db1d
@@ -419,6 +419,7 @@ class TimeEntryController extends Controller
|
|||||||
'currency' => $currency,
|
'currency' => $currency,
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
'subGroup' => $subGroup,
|
'subGroup' => $subGroup,
|
||||||
|
'timezone' => $timezone,
|
||||||
'start' => $request->getStart()->timezone($timezone),
|
'start' => $request->getStart()->timezone($timezone),
|
||||||
'end' => $request->getEnd()->timezone($timezone),
|
'end' => $request->getEnd()->timezone($timezone),
|
||||||
'debug' => $debug,
|
'debug' => $debug,
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<p style="font-size: 32px; font-weight: 600; margin-bottom: 5px;">Report</p>
|
<p style="font-size: 32px; font-weight: 600; margin-bottom: 5px;">Report</p>
|
||||||
<div style="font-size: 16px; font-weight: 600; color: #71717a;">
|
<div style="font-size: 16px; font-weight: 600; color: #71717a;">
|
||||||
<span>{{ $start->format('d.m.Y') }} - {{ $end->format('d.m.Y') }}</span><br><br>
|
<span>{{ $start->timezone($timezone)->format('d.m.Y') }} - {{ $end->timezone($timezone)->format('d.m.Y') }}</span><br><br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<p style="font-size: 32px; font-weight: 600; margin-bottom: 5px;">Detailed Report</p>
|
<p style="font-size: 32px; font-weight: 600; margin-bottom: 5px;">Detailed Report</p>
|
||||||
<div style="font-size: 16px; font-weight: 600; color: #71717a;">
|
<div style="font-size: 16px; font-weight: 600; color: #71717a;">
|
||||||
<span>{{ $start->format('d.m.Y') }} - {{ $end->format('d.m.Y') }}</span><br><br>
|
<span>{{ $start->timezone($timezone)->format('d.m.Y') }} - {{ $end->timezone($timezone)->format('d.m.Y') }}</span><br><br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-wrapper">
|
<div class="table-wrapper">
|
||||||
@@ -179,13 +179,13 @@
|
|||||||
</td>
|
</td>
|
||||||
<td style="overflow-wrap: break-word; min-width: 75px;">{{ $timeEntry->user->name }}</td>
|
<td style="overflow-wrap: break-word; min-width: 75px;">{{ $timeEntry->user->name }}</td>
|
||||||
<td style="overflow-wrap: break-word; min-width: 150px; text-align: center;">
|
<td style="overflow-wrap: break-word; min-width: 150px; text-align: center;">
|
||||||
@if($timeEntry->start->format('Y-m-d') === $timeEntry->end->format('Y-m-d'))
|
@if($timeEntry->start->timezone($timezone)->format('Y-m-d') === $timeEntry->end->timezone($timezone)->format('Y-m-d'))
|
||||||
{{ $timeEntry->start->format('Y-m-d') }}
|
{{ $timeEntry->start->timezone($timezone)->format('Y-m-d') }}
|
||||||
@else
|
@else
|
||||||
{{ $timeEntry->start->format('Y-m-d') }} - <br> {{ $timeEntry->end->format('Y-m-d') }}
|
{{ $timeEntry->start->timezone($timezone)->format('Y-m-d') }} - <br> {{ $timeEntry->end->timezone($timezone)->format('Y-m-d') }}
|
||||||
@endif
|
@endif
|
||||||
<br>
|
<br>
|
||||||
{{ $timeEntry->start->format('H:i:s') }} - {{ $timeEntry->end->format('H:i:s') }}
|
{{ $timeEntry->start->timezone($timezone)->format('H:i:s') }} - {{ $timeEntry->end->timezone($timezone)->format('H:i:s') }}
|
||||||
</td>
|
</td>
|
||||||
<td style="overflow-wrap: break-word; min-width: 75px;">
|
<td style="overflow-wrap: break-word; min-width: 75px;">
|
||||||
{{ $interval->format($timeEntry->getDuration()) }}
|
{{ $interval->format($timeEntry->getDuration()) }}
|
||||||
|
|||||||
Reference in New Issue
Block a user