Jump to content

only1dil

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

only1dil's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi guys m a beginner in programing.. and i would like some help of urs in this case.. i have this date/time fuction.. in which i want to implement the DST .. i knw php takes care of dst on its own.. but wht if its not set.. or if its the older version on php.. how can i do this.. here is the code.. which i want to modify // [[[[ $globals['pgtimezone'] = (float) (empty($user['timezone']) ? $globals['timezone'] : $user['timezone']); ]]]] //If $format is given then TODAY feature is overided function datify($timestamp, $today = true, $adjust = true, $format = false){ global $l, $user, $globals; //Are we to adjust time - By default yes if(!empty($adjust)){ $timestamp = max(0, $timestamp - ( (date('Z', time()) / 3600) - $globals['pgtimezone']) * 3600); } if(!empty($format)){ return date($format, $timestamp); } $todaytime = max(0, time() - ( (date('Z', time()) / 3600) - $globals['pgtimezone']) * 3600); //The date thingy if($today && date("F j, Y", $timestamp) == date("F j, Y", $todaytime)){ $time = date("g:i a", $timestamp); return $l['today'].$time; }else{ return date("F j, Y, g:i a", $timestamp); } } i want to give user the option for dst.. if they check the box.. to enable the dst. i want to give the time out in dst format..
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.