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
2kau
Forum Newbie
Posts: 1 Joined: Mon Jun 28, 2004 11:51 am
Post
by 2kau » Mon Jun 28, 2004 11:51 am
I have:
<?php
print date("F g, Y");
?>
It gives:
June 9, 2004
Why? Today is the 28th?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Jun 28, 2004 12:42 pm
[php_man]date[/php_man] wrote: g - 12-hour format of an hour without leading zeros
I think you want 'd'
dull1554
Forum Regular
Posts: 680 Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W
Post
by dull1554 » Mon Jun 28, 2004 1:00 pm
eother that or it may be that your php server is in another time zone.....
PrObLeM
Forum Contributor
Posts: 418 Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:
Post
by PrObLeM » Mon Jun 28, 2004 1:48 pm
its a possiblity that the server time he WAY off!
redmonkey
Forum Regular
Posts: 836 Joined: Thu Dec 18, 2003 3:58 pm
Post
by redmonkey » Mon Jun 28, 2004 2:34 pm
What feyd is getting at is....
Code: Select all
print date("F g, Y") . "\x0a";
print date("F d, Y") . "\x0a";
outputs....
Given that is is indeed 7 o'clock in my time zone at present and it's also the 28th.