Welcome Guest, Not a member yet? Register   Sign In
NOW() - Problem
#1

[eluser]felixk[/eluser]
I'm using the date helper, and the function now().

But it seems like it's not working properly, when the date is 2009-08-11 and time 10.57, the output is "1249981023".
That can't be correct? Tongue

Any ideas?
#2

[eluser]comex[/eluser]
Check this out.

What you're getting is an UNIX timestamp.
#3

[eluser]davidbehler[/eluser]
What's being returned is a timestamp.

The now() function from the date helper is not the same as the MySQL NOW() function!
#4

[eluser]felixk[/eluser]
Okey, thank you. But how should i solve it?
Just don't include the date helper? And still use now()?
#5

[eluser]comex[/eluser]
Well, check out the user guide, take a special look at mdate. Or just use PHPs native functions for dealing with datetime.
#6

[eluser]Phil Sturgeon[/eluser]
http://php.net/date
#7

[eluser]felixk[/eluser]
Thank's guys!
I did like this:
Code:
date('Y-m-d, H:i')




Theme © iAndrew 2016 - Forum software by © MyBB