[eluser]darkhouse[/eluser]
[quote author="SAC Version 27.11" date="1247823935"]Maybe you're right, if he only needs to save the current date everytime, but if he needs to work with the stored dates, to show it and save it then, date('Y-m-d H:i
') is not enough. But both answers are perfectly valids[/quote]
Looking at his code, that's what he's doing, since he's got $time = time(); But if he needs it based on another time, then another method might be this:
Code:
$date = date('Y-m-d H:i:s', strtotime($localtime));
I haven't tested it though.