2

I am trying to get todays day using PHP date function but it is coming back with 31/03/2013 which is tomorrow. I have tried changing the default timezone but it still returns the same.

    date_default_timezone_set('Europe/Dublin');
    echo date("d/m/Y");

Any ideas?

User787665
  • 237
  • 4
  • 23
  • 2
    Are you sure the server-time is correct? Also today may be a bad day to test dates since many countries switch DST – Eric Herlitz Mar 30 '13 at 19:56
  • It's on my windows PC running WAMP. The date on the systray clock is correct unless there is somewhere else I should be checking? – User787665 Mar 30 '13 at 19:58
  • 1
    Can you do `echo time()` both before and after `date_default_timezone_set`? – Tushar Mar 30 '13 at 20:02
  • Yep. The timezone seems to be correct as the time stamp doesn't change when I add/remove the date_default_timezone_set() – User787665 Mar 30 '13 at 20:10

1 Answers1

-2

Looks to like bug in php 5.3.2-1. Try to run the php script in the bug report and post your results.

justnajm
  • 4,422
  • 6
  • 36
  • 56