Is there a Timezone for Brasilia?

Asked

Viewed 8,579 times

8

I am developing an app in PHP. And I need to set Timezone for Brasilia. However in the php documentation I have:

$timezones = array(
'AC' => 'America/Rio_branco',   'AL' => 'America/Maceio',
'AP' => 'America/Belem',        'AM' => 'America/Manaus',
'BA' => 'America/Bahia',        'CE' => 'America/Fortaleza',
'DF' => 'America/Sao_Paulo',    'ES' => 'America/Sao_Paulo',
'GO' => 'America/Sao_Paulo',    'MA' => 'America/Fortaleza',
'MT' => 'America/Cuiaba',       'MS' => 'America/Campo_Grande',
'MG' => 'America/Sao_Paulo',    'PR' => 'America/Sao_Paulo',
'PB' => 'America/Fortaleza',    'PA' => 'America/Belem',
'PE' => 'America/Recife',       'PI' => 'America/Fortaleza',
'RJ' => 'America/Sao_Paulo',    'RN' => 'America/Fortaleza',
'RS' => 'America/Sao_Paulo',    'RO' => 'America/Porto_Velho',
'RR' => 'America/Boa_Vista',    'SC' => 'America/Sao_Paulo',
'SE' => 'America/Maceio',       'SP' => 'America/Sao_Paulo',
'TO' => 'America/Araguaia',     
);

How should I proceed ?

I consulted this source: https://secure.php.net/manual/en/timezones.america.php

  • 1

    In practice it is the same as São Paulo... gmt-3 with daylight saving time

  • Following your array, by state, is correct 'DF' => date_default_timezone_set('America/Sao_paulo');

1 answer

13


  • 4

    I’ve always found it odd that the nation’s capital doesn’t have a specific one, even if it’s just symbolic.

  • 7

    @Gabe The IANA criterion is the most populous city, you can notice in the other Tzs ;) "Usually the Most populous city in a Region is Chosen to represent the entire time zone, Although other Cities may be Selected if they are more widely known or result in a Less ambiguous name" https://en.wikipedia.org/wiki/Tz_database (Citation needed x 2)

  • 3

    @Bacco Aaaah, okay. It’s weird, but at least it has a criterion!

  • Dude, Acre’s got :D

  • 3

    @Wallacemaxters No, Acre has nothing to do with this, Rio Branco is the most populous city in that region, completely within the criteria.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.