Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
<?php
namespace HiEvents\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class HandleDeprecatedTimezones
{
public function handle(Request $request, Closure $next)
{
$timezoneMapping = config('timezones.deprecated');
if ($request->has('timezone')) {
$timezone = $request->input('timezone');
if (array_key_exists($timezone, $timezoneMapping)) {
$request->merge(['timezone' => $timezoneMapping[$timezone]]);
} elseif (! in_array($timezone, timezone_identifiers_list(), true)) {
Log::warning("Unexpected timezone received: $timezone");
}
}
return $next($request);
}
}