PHP date script returns warning message

Here are the results I get:

With reporting off:

The date is
Australia/Melbourne
Result: 1
Thursday, December 09th 2010.

and with reporting on:

The date is
Notice: Use of undefined constant E_DEPRECATED - assumed ‘E_DEPRECATED’ in /Users/username/folder/date-test.php on line 25

Australia/Melbourne
Result: 1
Thursday, December 09th 2010.

The results I received were the same in both cases:

Today’s date (according to this web server) is
America/New_York
Result: 1
Wednesday, December 08th 2010.

Hope this helps.

Helps whom? I think the problem was originated by you. So did it solve your problem?

Notice: Use of undefined constant E_DEPRECATED - assumed ‘E_DEPRECATED’ in /Users/username/folder/date-test.php on line 25

The “result: 1” indicates that the date setting was successful but it looks like you PHP version is less than 5.30.

PHP Changelog
Version Description
5.0.0 E_STRICT introduced (not part of E_ALL).
5.2.0 E_RECOVERABLE_ERROR introduced.
5.3.0 E_DEPRECATED and E_USER_DEPRECATED introduced.

Well, it did but I thought he was looking for something in particular as far as the results went (maybe on different versions). My apologies; the solution did work and did not return any of the errors I had before. I’m going to study it some more and see if I can determine why one works over another.

Thanks so much for the script John! I will definitely be able to learn from this.