now()); $date->setTimezone(new DateTimeZone($tzString)); } catch (Exception $e) { // Use the raw fallback sink because this method is part of // the logging path; calling warn here would risk recursion if // timezone failure also breaks warn's own DateTime use. abj404_logPhpFallback( 'logger-internal', 'timezone constructor failed (' . $e->getMessage() . '); using server default' ); $date = new DateTime('@' . abj_clock()->now()); $date->setTimezone(new DateTimeZone(date_default_timezone_get())); } return $date->format('Y-m-d H:i:s T'); } }