jun 102012
 

Quando em ambiente Windows, nada mais simples que o Easy PHP para desenvolvimento. Simples, funcional e direto.

Porém a instalação padrão, de tão simplista e prática, deixa de lado algumas configurações importantes.

Dentre elas a questão da data, mais especificamente o fuso horário.

Ao usar, no PHP a função time(), que retorna um inteiro que representa o TIMESTAMP UNIX, quando incorretamente configurado o fuso, acaba dando problema.

Como exemplo, ao interpretar o TIMESTAMP este acaba cvomo sendo três horas após. Isso se deve so fuso horário padrão – e incorreto para nós – na configuração do apache.

Vamos à correção:

Botão direito no ícone do Esay PHP:

Em seguida em ‘Administration’, ‘Apache’:

No arquivo de texto que vai abrir, busque por PHP Timezone, encontrarás a configuração padrão:

Altere a configuração “Europe/Paris” para “America/Sao_Paulo":

Pronto, problema resolvido.

Entendendo o que acontece:

O TIMESTAMP Unix retorna o número de segundos decorridos desde as 00:00h de 1 de janeiro de 1970.

Porém, tal retorno reflete a data e hora no meridiano de Greenwich, ou seja, do “meio do mundo”. Cada país no entorno tem seu fuso horário, o nosso (em São Paulo) é GMT -3, ou seja, horário de Greenwich -3 horas.

Cabe ainda apontar que no brasil temos três fusos horários GMT -4, -3 e -2, conforme a região, com ou sem horário de verão.

Veja os mapas:

Sem Horário de Verão/Com horário de Verão:

Clique para ampliar

Clique para ampliar

Segue a configuração dos principais fusos:

'Kwajalein' => -12.00,
'Pacific/Midway' => -11.00,
'Pacific/Honolulu' => -10.00,
'America/Anchorage' => -9.00,
'America/Los_Angeles' => -8.00,
'America/Denver' => -7.00,
'America/Tegucigalpa' => -6.00,
'America/New_York' => -5.00,
'America/Caracas' => -4.30,
'America/Halifax' => -4.00,
'America/St_Johns' => -3.30,
'America/Argentina/Buenos_Aires' => -3.00,
'America/Sao_Paulo' => -3.00,
'Atlantic/South_Georgia' => -2.00,
'Atlantic/Azores' => -1.00,
'Europe/Dublin' => 0,
'Europe/Belgrade' => 1.00,
'Europe/Minsk' => 2.00,
'Asia/Kuwait' => 3.00,
'Asia/Tehran' => 3.30,
'Asia/Muscat' => 4.00,
'Asia/Yekaterinburg' => 5.00,
'Asia/Kolkata' => 5.30,
'Asia/Katmandu' => 5.45,
'Asia/Dhaka' => 6.00,
'Asia/Rangoon' => 6.30,
'Asia/Krasnoyarsk' => 7.00,
'Asia/Brunei' => 8.00,
'Asia/Seoul' => 9.00,
'Australia/Darwin' => 9.30,
'Australia/Canberra' => 10.00,
'Asia/Magadan' => 11.00,
'Pacific/Fiji' => 12.00,
'Pacific/Tongatapu' => 13.00

  31 Responses to “Apache, Easy PHP e horário errado”

  1. Very good blog you have here but I was wanting to know if you knew of any community forums that cover the
    same topics discussed here? I’d really like to be a part of online community where
    I can get responses from other experienced people that share the same interest.

    If you have any recommendations, please let me know.

    Appreciate it!

  2. I never really understood what strokes were.

    https://siviagmen.com best
    place to buy generic viagra online

  3. It can be far slower in those on various treatments.
    http://llviabest.com get viagra
    online

  4. Viral pneumonia can produce symptoms similar to those of
    the flu, including fever, muscle aches, breathlessness, rapid breathing, and a
    dry cough, which can worsen and eventually
    bring up a small amount of mucus. https://genqpviag.com buy generic viagra 100mg

  5. Legal Statement This site complies with the HONcode standard for trustworthy health information: verify here.
    http://impotencecdny.com viagra vs cialis

  6. Because some states do not allow the exclusion or limitation of liability for consequential or incidental damages, this limitation may not apply to you.
    buybuyviamen.com female
    viagra over the counter

  7. About 90 percent of pancreatic cancers develop in duct cells.
    womens viagra viagraviagria buy real viagra online

  8. Sometimes, however, the smaller chest muscle pectoralis minor may be removed, too.
    female viagra walmart (asgenviagria.com) order viagra online

  9. Indeed, post-mortem examinations show that half of all HIV-related diseases found at autopsy have not
    been diagnosed during life. hdgenericviagraxk.com Indeed, post-mortem examinations show that half
    of all HIV-related diseases found at autopsy have not been diagnosed during life.

  10. I was wondering whether you had been told whether you can go on HRT
    whilst taking citalopram? ltdviagragogo.com I was wondering whether you
    had been told whether you can go on HRT whilst taking citalopram?

  11. Pancreatic Cancer Stages Pancreatic Cancer Diagnosis Pancreatic Cancer Surgical
    Treatment Pancreatic Cancer Medical Treatment Alternative,
    Complementary and Holistic Treatment Neuroendocrine, Islet-cell and Carcinoid Tumors Pancreatic
    Cancer Clinical Trials Pancreatic Cancer Troubling Signs and Symptoms Pancreatic Cancer Prognosis Pancreatic Cancer Risk Factors Pancreatic
    Cancer Screening Tests and Markers Pancreatic Cancer Registries Contact Us Cancer Patients Alliance 312 Fountain Avenue Pacific Grove,
    California 93950 Phone: 831 658-0600 Email: info pancreatica.
    http://buygenericviarga.com/ Pancreatic Cancer Stages Pancreatic Cancer
    Diagnosis Pancreatic Cancer Surgical Treatment Pancreatic
    Cancer Medical Treatment Alternative, Complementary and Holistic Treatment Neuroendocrine, Islet-cell and
    Carcinoid Tumors Pancreatic Cancer Clinical Trials Pancreatic Cancer Troubling
    Signs and Symptoms Pancreatic Cancer Prognosis
    Pancreatic Cancer Risk Factors Pancreatic Cancer Screening
    Tests and Markers Pancreatic Cancer Registries Contact Us Cancer Patients Alliance 312 Fountain Avenue Pacific Grove,
    California 93950 Phone: 831 658-0600 Email: info pancreatica.

  12. Len C, Hilario MO, Kawakami E, Terreri MT, Becker DJ, Goldenberg J, et al.

    is viagra safe Len C,
    Hilario MO, Kawakami E, Terreri MT, Becker DJ, Goldenberg J, et al.

  13. This is one of the most appropriate occasions to use anti-viral drugs in the poorest nations.
    viagra generic name This
    is one of the most appropriate occasions to use anti-viral
    drugs in the poorest nations.

  14. Reply Link Sadie LS December 15, 2011, 10:36 amHi DP Nguyen, me and my partner
    are trying for a baby and at the moment i am four days late.
    viagra without a doctor prescription usa
    Reply Link Sadie LS December 15, 2011, 10:36 amHi DP Nguyen, me and
    my partner are trying for a baby and at the moment i am four days late.

  15. Hi there! Do you know if they make any plugins to protect
    against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any suggestions?

  16. There are several types of leukemia. buy generic 100mg viagra online There are several types of leukemia.

  17. Do you have a sexually transmitted disease, or do you have a fever
    or foul-smelling vaginal discharge? cost of viagra Do
    you have a sexually transmitted disease, or do you have a fever or foul-smelling vaginal discharge?

  18. Viagra canada viagra online generic viagra cost

  19. Great items from you, man. I have understand your stuff prior to and
    you’re just too excellent. I really like what you’ve acquired here, really like what you are saying and the way in which in which you are saying it.
    You are making it enjoyable and you still care for to stay it wise.
    I cant wait to learn far more from you. That is actually a tremendous website.

  20. How to take viagra http://xviagarrx.com buy real viagra online

  21. Cialis generic name https://cialmenshoprx.com cialis for sale

  22. Pharmacy online cialis pills tadalafil online

  23. Online loans with monthly payments https://best12loans.com online personal loans

  24. удалите,пожалуйста! .

  25. Попробуйте поискать ответ на Ваш вопрос в google.com


    Я извиняюсь, но, по-моему, Вы не правы. Я уверен. Пишите мне в PM, пообщаемся. скачать фифа, скачать фифа и скачать кряк для fifa 15 скачать фифа

  26. Legal

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)