hi, i see a professional scripts allow you to define the way you want to display time of posts and allow member to define there time zone and so on how can i do this i want lesson to learn the best way to using date functions
Well, most of scripts store time in integer, the valued obtained rom function time() in php which provides the unix timestamp in form of seconds. Then passing the stored value to function date returns a formated date. e.g. $postdate = time(); #stored Code (markup): #now retrieving and formating $date = date("F d, Y",$postdate); #results something like September 9, 2008 Code (markup): As far formatting as per timezone The timezone values are stored such as +5, -5, +4, +3 (HOURS). e.g. formatting as per timezone +5 hours $hours = 5; $postdate = $postdate + ($hours * 3600); #where 3600 is seconds of an hour $date = date("F d, Y",$postdate); Code (markup): I hope you have now an idea how it works. regards