Skip to content

Commit

Permalink
Reverse #1663 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Studio384 committed Jun 13, 2018
1 parent a5cd909 commit 4d02f20
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1267,28 +1267,23 @@ function get_icon($icon, $style = null) {
//
// Format a time string according to $time_format and time zones
//
function format_time($timestamp, $date_only = false, $date_format = null, $time_format = null, $time_only = false, $no_text = false, $user = null) {
function format_time($timestamp, $date_only = false, $date_format = null, $time_format = null, $time_only = false, $no_text = false) {
global $luna_config, $luna_user, $forum_date_formats, $forum_time_formats;

if ($timestamp == '') {
return __('Never', 'luna');
}

if (is_null($user))
$user = $pun_user;

$diff = ($user['timezone'] + $user['dst']) * 3600;

$now = time();

if(is_null($date_format))
$date_format = $forum_date_formats[$user['date_format']];
$date_format = $forum_date_formats[$luna_user['date_format']];

if(is_null($time_format))
$time_format = $forum_time_formats[$user['time_format']];
$time_format = $forum_time_formats[$luna_user['time_format']];

if (is_null($time_format)) {
$time_format = $forum_time_formats[$user['time_format']];
$time_format = $forum_time_formats[$luna_user['time_format']];
}

$date = date($date_format, $timestamp);
Expand Down

0 comments on commit 4d02f20

Please sign in to comment.