Avatar ·

Erro "It is not safe to rely on the system's timezone settings" no PHP: como corrigir?

Olá a todos! Comecei a estudar PHP e me deparei com um erro estranho ao tentar exibir a data atual. Escrevi um script simples:\n\n```php\n\n```\n\nMas em vez da data, recebo um aviso:\n\n```\nWarning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.\n```\n\nEstou trabalhando no servidor local OpenServer, PHP versão 8.2. Tentei pesquisar no Google, mas os conselhos variam: alguns dizem para editar o php.ini, outros para adicionar uma função no código.