date() driving me crazy

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

date() driving me crazy

Post by JayBird »

I can't find the logical explanation for this

i run this code somewhere in my script

Code: Select all

echo date("l dS F, Y \\a\\t H:i:s", '1091025855');
This should output

Code: Select all

Wednesday 28th July, 2004 at 15:44:15
but it is outputting..

Code: Select all

Wednesday 28th July, 2004 at 14:44:15
Notice that is is one hour behind what it should be.

I have no idea why!!!

Mark
User avatar
Skittlewidth
Forum Contributor
Posts: 389
Joined: Wed Nov 06, 2002 9:18 am
Location: Kent, UK

Post by Skittlewidth »

We're on BST at the moment! (British Summer Time)
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Nope, not the problem.

The timestamp gets update on the hour, now it has just turned 4 o'clock, the output is correct for some reason.

Dunno why it was doing that, but it seems to be working okay now!!

Mark
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

well, it gives me

Code: Select all

Wednesday 28th July, 2004 at 17:44:15
:lol:
User avatar
Skittlewidth
Forum Contributor
Posts: 389
Joined: Wed Nov 06, 2002 9:18 am
Location: Kent, UK

Post by Skittlewidth »

Odd. My problems always seem to fix themselves the second I post as well :)
Post Reply