Welcome Guest, Not a member yet? Register   Sign In
rss date format
#1

[eluser]benfike[/eluser]
Hi!

I have an problem, here is the date code.
Code:
<?php echo date($post['maindate']) ?>


But when i view all date good, but hours and minutes all the time: 2:00? why?

help please

I wanna YEAR-MONATH-DAY HOUR:MINUTES format
#2

[eluser]xzela[/eluser]
hi,

try:
Code:
echo date('Y-m-d h:i', $post['maindate']);

also, try reading this documentation:
http://www.php.net/manual/en/function.date.php
#3

[eluser]dmorin[/eluser]
that will only work if $post['maindate'] is a unix timestamp. Try:

Code:
echo date('Y-m-d H:i', strtotime($post['maindate']));
#4

[eluser]xzela[/eluser]
yes, dmorin is correct, that would work perfectly.
#5

[eluser]benfike[/eluser]
I change code to this dmorin, but doesn't work.. Again 02:00 all time!:S

you can see RSS: http://arsenalfan.hu/rss
#6

[eluser]xzela[/eluser]
your pubdate looks fine to me:
Code:
<pubDate>2009-07-25 17:26</pubDate>

isn't that what you wanted?
#7

[eluser]benfike[/eluser]
yes in the source this is good, but in view this shit Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB