Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
¿Qué pasa con mi fecha de PHP?

Son las 6:32 p. m. EST, pero H se devuelve como 22. Espero que sea 18. PHP es la versión 5.3.9

¿Qué estoy haciendo mal aquí?

 <?php $time = date("H"); if( $time >= 06 && $time < 10 ) $img_name = 'sunrise.jpg'; if( $time >= 10 && $time < 17 ) $img_name = 'day.jpg'; if( $time >= 17 && $time < 19 ) $img_name = 'sunset.jpg'; if( $time >= 19 && $time < 06 ) $img_name = 'night.jpg'; ?>
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Dos cosas posibles:

  1. La hora de su servidor podría estar apagada. Verifique el servidor en el que está alojado para asegurarse de que no esté

  2. Establecer una zona horaria . Podemos decirle a PHP qué zona horaria usar haciendo esto:

    date_default_timezone_set('América/Los_Ángeles');

Puede ver una lista de zonas horarias admitidas aquí: http://php.net/manual/en/timezones.php

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!