J
Jason
Until recently, my site was on a remote-hosted shared server; as of
today, I've completely upgraded to a dedicated.
I use to use the following to determine the timestamp for my forum:
($sec, $min, $hour, $day, $mon, $year, $wday) = (localtime(time +
(60*60)))[0,1,2,3,4,5,6];
$month = $mon + 1;
$year += 1900;
$today = "$year";
if ($month < 10) { $today .= "0"; }
$today .= "$month";
if ($day < 10) { $today .= "0"; }
$today .= "$day";
if ($hour < 10) { $hour = "0" . $hour; }
if ($min < 10) { $min = "0" . $min; }
if ($sec < 10) { $sec = "0" . $sec; }
$thistimestamp = $year . $month . $day . $hour . $min . $sec; # eg,
20060910040541
But after my server change, my hour is now an hour greater than it
should be (if it's 10am, this code states that it's 11am). I can't
figure out why, though, because through WHM, my server time matches my
local time.
What's the quickest way to decrease this code by an hour? Currently,
all posts in my forum are going to have to be corrected by hand (and I
get, on average, 1 post every 3 minutes), so I'm more concerned with
modifying the code quickly than anything else.
TIA,
Jason
today, I've completely upgraded to a dedicated.
I use to use the following to determine the timestamp for my forum:
($sec, $min, $hour, $day, $mon, $year, $wday) = (localtime(time +
(60*60)))[0,1,2,3,4,5,6];
$month = $mon + 1;
$year += 1900;
$today = "$year";
if ($month < 10) { $today .= "0"; }
$today .= "$month";
if ($day < 10) { $today .= "0"; }
$today .= "$day";
if ($hour < 10) { $hour = "0" . $hour; }
if ($min < 10) { $min = "0" . $min; }
if ($sec < 10) { $sec = "0" . $sec; }
$thistimestamp = $year . $month . $day . $hour . $min . $sec; # eg,
20060910040541
But after my server change, my hour is now an hour greater than it
should be (if it's 10am, this code states that it's 11am). I can't
figure out why, though, because through WHM, my server time matches my
local time.
What's the quickest way to decrease this code by an hour? Currently,
all posts in my forum are going to have to be corrected by hand (and I
get, on average, 1 post every 3 minutes), so I'm more concerned with
modifying the code quickly than anything else.
TIA,
Jason