posted on Jan, 13 2005 @ 10:29 PM
Well time() returns the number of seconds from the Unix Epoch of Jaunary 1, 1970 at 00:00. Time in PHP is calculated this way. But...its GMT, since
mine is 5 hours ahead.
Calculates the date and displays it as such: January 14, 2005, 4:29 am...when its still January 13, 2005 11:30pm for me.
Just echoing time() would just show the seconds since the epoch which does no good. You have to use the date() function to format it into the way you
So for Night and Day...you could use something like $amorpm = date("a",$time)
which would display either am
something along the lines of using if()( and ) else (. I think you might be able to figure it out.
I havent tested the above ^^^. Just the am, pm part.
Hit quote or edit to see the unaltered code...it cant be posted without screwing it up.
[edit on 13-1-2005 by dreamlandmafia]