Forum Moderators: coopster
default date string is 0000-00-00 00:00:00 in my database. and i can add date("Y-n-j H:i:s"). it works.
but;
i use to call date .... echo date('j-n-y', $take['date']) .... this func. i want to take only j,n and y.
but when i call date with this string, it always gives me 1-1-97.
what is this problem?
(if i use only ...echo $take['date']..., it gives 2005-05-11 20:04:45.)
date is given by time()
time() is the current unix timestamp; the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). Can you believe it?
that is tasty for your computer.
use:
define('TIME_NOW', time());
or better
define('TIME_NOW', time() + $gmtDifferences);
considering the entire world
you obtain $gmtDifferences with javascript (auto) or setting by your users (manual: not reliable).
now let's type!
------------------------------------
consider: getdate(), date(), mktime(), time()
read the nanual!