1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 23:39:37 +02:00

chore: Update time zone handling in code

This commit is contained in:
Sean Morley 2024-08-17 08:30:24 -04:00
parent 4d193bc44d
commit 2b16712496
9 changed files with 18 additions and 15 deletions

View file

@ -198,7 +198,7 @@
{#if adventure.date && adventure.date !== ''}
<div class="inline-flex items-center">
<Calendar class="w-5 h-5 mr-1" />
<p>{new Date(adventure.date).toLocaleDateString('en-US', { timeZone: 'UTC' })}</p>
<p>{new Date(adventure.date).toLocaleDateString(undefined, { timeZone: 'UTC' })}</p>
</div>
{/if}
{#if adventure.activity_types && adventure.activity_types.length > 0}

View file

@ -44,7 +44,7 @@
{#if checklist.date && checklist.date !== ''}
<div class="inline-flex items-center">
<Calendar class="w-5 h-5 mr-1" />
<p>{new Date(checklist.date).toLocaleDateString('en-US', { timeZone: 'UTC' })}</p>
<p>{new Date(checklist.date).toLocaleDateString(undefined, { timeZone: 'UTC' })}</p>
</div>
{/if}
<div class="card-actions justify-end">

View file

@ -98,9 +98,8 @@
<p>{collection.adventures.length} Adventures</p>
{#if collection.start_date && collection.end_date}
<p>
Dates: {new Date(collection.start_date).toLocaleDateString('en-US', { timeZone: 'UTC' })} - {new Date(
collection.end_date
).toLocaleDateString('en-US', { timeZone: 'UTC' })}
Dates: {new Date(collection.start_date).toLocaleDateString(undefined, { timeZone: 'UTC' })} -
{new Date(collection.end_date).toLocaleDateString(undefined, { timeZone: 'UTC' })}
</p>
<!-- display the duration in days -->
<p>

View file

@ -45,7 +45,7 @@
{#if note.date && note.date !== ''}
<div class="inline-flex items-center">
<Calendar class="w-5 h-5 mr-1" />
<p>{new Date(note.date).toLocaleDateString('en-US', { timeZone: 'UTC' })}</p>
<p>{new Date(note.date).toLocaleDateString(undefined, { timeZone: 'UTC' })}</p>
</div>
{/if}
<div class="card-actions justify-end">

View file

@ -50,7 +50,7 @@
</p>
{/if}
{#if transportation.date}
{new Date(transportation.date).toLocaleString()}
{new Date(transportation.date).toLocaleString(undefined, { timeZone: 'UTC' })}
{/if}
{#if user?.pk === transportation.user_id}
<div class="card-actions justify-end">