Jake Vanderwerf
2026-09-15 01e9a8e40351a87f6548a4f55de842d6f6918ad0
inc/helpers/time.php
@@ -1,6 +1,6 @@
<?php
use JVBase\base\options;
use JVBase\base\Options;
use JVBase\managers\Cache;
use JVBase\meta\Meta;
@@ -322,7 +322,7 @@
{
   // Get hours data if not provided
   if ($hours_data === null) {
      $hours_data = options::get('openingHours');
      $hours_data = Options::get('openingHours');
   }
   // Return false if no hours data
@@ -374,15 +374,15 @@
 * @throws DateInvalidTimeZoneException
 * @throws DateMalformedStringException
 */
function jvbIsTimeBetween(?string $start_time = null, ?string $end_time = null, string $timezone = 'America/Edmonton'):bool {
function jvbIsTimeBetween(?string $start_time = null, ?string $end_time = null):bool {
   if (!$start_time && !$end_time) {
      $hours = options::get('today_hours');
      $hours = Options::get('today_hours');
      $start_time = $hours['time_start'];
      $end_time = $hours['time_end'];
   }
   // Get current time in specified timezone
   $current_time = new DateTime('now', new DateTimeZone($timezone));
   $current_time = new DateTime('now', wp_timezone());
   $current_time_string = $current_time->format('H:i');
   // Normalize time formats (handle with or without seconds)