Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
Archived Discussions
Archived Development & Programming
NOW() - Problem
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
NOW() - Problem
El Forum
Guest
#1
08-11-2009, 02:58 AM
[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?
Any ideas?
El Forum
Guest
#2
08-11-2009, 03:12 AM
[eluser]comex[/eluser]
Check this out.
What you're getting is an UNIX timestamp.
El Forum
Guest
#3
08-11-2009, 03:14 AM
[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!
El Forum
Guest
#4
08-11-2009, 03:17 AM
[eluser]felixk[/eluser]
Okey, thank you. But how should i solve it?
Just don't include the date helper? And still use now()?
El Forum
Guest
#5
08-11-2009, 03:19 AM
[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.
El Forum
Guest
#6
08-11-2009, 03:22 AM
[eluser]Phil Sturgeon[/eluser]
http://php.net/date
El Forum
Guest
#7
08-11-2009, 03:39 AM
[eluser]felixk[/eluser]
Thank's guys!
I did like this:
Code:
date('Y-m-d, H:i')
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB