This repository was archived by the owner on Jun 12, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
resources/views/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,22 @@ public function getEndDate(): ?Carbon
7272 return $ this ->end_date ;
7373 }
7474
75+ /**
76+ * Get the start date as an absolute ISO 8601 instant, interpreting the
77+ * stored wall-clock time as the conference timezone (e.g. America/Chicago).
78+ */
79+ public function getStartInstantIso (): ?string
80+ {
81+ if (! $ this ->start_date ) {
82+ return null ;
83+ }
84+
85+ return $ this ->start_date
86+ ->copy ()
87+ ->shiftTimezone (config ('tek.conference.timezone ' ))
88+ ->toIso8601String ();
89+ }
90+
7591 /**
7692 * Get the formatted start date.
7793 */
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class="inline-block py-1 px-3 rounded-full bg-tek-blue-100 dark:bg-tek-blue-800/
2121 opportunities with the PHP community.
2222 </p >
2323 @if ($conference && $conference -> getStartDate () )
24- <div x-data =" countdown('{{ $conference -> getStartDate () -> toIso8601String () } } ')"
24+ <div x-data =" countdown('{{ $conference -> getStartInstantIso () } } ')"
2525 class =" bg-white/80 dark:bg-tek-blue-900/30 backdrop-blur-sm border border-tek-blue-200 dark:border-tek-blue-800 rounded-xl p-4 md:p-6 shadow-md max-w-xl"
2626 role =" timer"
2727 aria-live =" polite"
Original file line number Diff line number Diff line change @@ -67,6 +67,25 @@ public function test_conference_direct_attribute_access(): void
6767 $ this ->assertEquals ('2026-07-02 ' , $ conference ->end_date ->format ('Y-m-d ' ));
6868 }
6969
70+ /**
71+ * The start instant ISO string should be expressed against the configured
72+ * conference timezone (Central time), not the application's UTC default.
73+ */
74+ public function test_start_instant_iso_uses_conference_timezone (): void
75+ {
76+ config ()->set ('tek.conference.timezone ' , 'America/Chicago ' );
77+
78+ $ conference = Conference::create ([
79+ 'uuid ' => 'test-uuid-instant ' ,
80+ 'name ' => 'Instant Conference ' ,
81+ 'start_date ' => '2026-05-19 09:00:00 ' ,
82+ 'end_date ' => '2026-05-21 17:00:00 ' ,
83+ ]);
84+
85+ // 9:00 AM Central in May (CDT, UTC-5) is 14:00 UTC.
86+ $ this ->assertEquals ('2026-05-19T09:00:00-05:00 ' , $ conference ->getStartInstantIso ());
87+ }
88+
7089 /**
7190 * Test the formatted date range method.
7291 */
You can’t perform that action at this time.
0 commit comments