Skip to content

Commit

Permalink
Fixes from douwe_yntema
Browse files Browse the repository at this point in the history
  • Loading branch information
JoakimFalk committed Jan 13, 2023
1 parent 041169e commit cc2f0d4
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions maincore.php
Expand Up @@ -1222,18 +1222,24 @@ function makepagenav($start, $count, $total, $range = 0, $link = "", $getname =
// Format the date & time accordingly
function showdate($format, $val) {
global $settings, $userdata;

if (isset($userdata['user_offset'])) {
$offset = $userdata['user_offset'] + $settings['serveroffset'];
$offset = $userdata['user_offset']+$settings['serveroffset'];
} else {
$offset = $settings['timeoffset'] + $settings['serveroffset'];
}
$offset = $settings['timeoffset']+$settings['serveroffset'];
}
// Correction for Daylight saving Time
$dls = 0;
if (date('I', $val+($offset*3600)) == 1){
$dls = 3600;
}

if ($format == "shortdate" || $format == "longdate" || $format == "forumdate" || $format == "newsdate") {
return format_date($settings[$format], $val + ($offset * 3600));
return format_date($settings[$format], $val+$dls+($offset*3600));
} else {
return format_date($format, $val + ($offset * 3600));
return format_date($format, $val+$dls+($offset*3600));
}
}
}

/**
* Format date - replacement for strftime()
Expand Down

0 comments on commit cc2f0d4

Please sign in to comment.