What bothers you more? The notice or the fact that the timezone
defaulted to UTC?
What bothers me most is that we sometimes got the message and other times
we didn't. Restarting the Apache server would sometimes fix it, other
times it wouldn't.
I have apparently fixed it by adding the following to
'/www/zendcore/htdocs/pmwiki/pmwiki.php':
date_default_timezone_set("America/New_York");
The hard part was deciding where to insert it into the file. Seeing code
like:
$page = RetrieveAuthPage($pagename, $auth, true);
if (!$page) { Abort("?unable to read $pagename"); }
foreach($PageAttributes as $attr=>$p) {
$v = stripmagic(@$_POST[$attr]);
if ($v == '') continue;
if ($v=='clear') unset($page[$attr]);
else if (strncmp($attr, 'passwd', 6) != 0) $page[$attr] = $v;
else {
$a = array();
preg_match_all('/"[^"]*"|\'[^\']*\'|\\S+/', $v, $match);
foreach($match[0] as $pw)
$a[] = preg_match('/^(@|\\w+:)/', $pw) ? $pw
: crypt(preg_replace('/^([\'"])(.*)\\1$/', '$2', $pw));
if ($a) $page[$attr] = implode(' ',$a);
}
}
left me wondering where exactly I could add the line. I finally settled
for inserting it before the line that has $WikiTitle = 'PmWiki'; and seems
to have fixed it. Why the error only came up after running the Wiki for
close to a month, I don't know. Why it could sometimes be fixed by
restarting the Apache instance, I don't know. I guess that's the
difference between a programmer and a systems analyst--the amount of stuff
you DON'T know....
As an Amazon Associate we earn from qualifying purchases.