diff --git a/lib/helpers.php b/lib/helpers.php index df657d7..439d1ed 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -23,6 +23,19 @@ function friendly_date($date_string, $tz_offset) { return $date->format('F j, Y H:i:s') . ' ' . $tz; } +function format_date($date_string, $tz_offset) { + if(!$date_string) + return ''; + + $date = new DateTime($date_string); + if($tz_offset > 0) + $date->add(new DateInterval('PT'.$tz_offset.'S')); + elseif($tz_offset < 0) + $date->sub(new DateInterval('PT'.abs($tz_offset).'S')); + $tz = ($tz_offset < 0 ? '-' : '+') . sprintf('%02d:%02d', abs($tz_offset/60/60), ($tz_offset/60)%60); + return $date->format('Y-m-d H:i:s') . ' ' . $tz; +} + function build_url($parsed_url) { $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; diff --git a/public/css/style.css b/public/css/style.css index 579e5d9..4d5dc3e 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -26,7 +26,6 @@ body.logged-out { } .narrow { - background: #fff; max-width: 700px; margin-right: auto; margin-left: auto; @@ -65,6 +64,7 @@ body.logged-out { } .subscription-status, .feed-status { + background: #fff; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; diff --git a/public/images/switchboard-logo.png b/public/images/switchboard-logo.png index 8b118e0..d77a1b2 100644 Binary files a/public/images/switchboard-logo.png and b/public/images/switchboard-logo.png differ diff --git a/public/images/switchboard-logo.psd b/public/images/switchboard-logo.psd index 08605db..b4a4de5 100644 Binary files a/public/images/switchboard-logo.psd and b/public/images/switchboard-logo.psd differ diff --git a/views/feed-status.php b/views/feed-status.php index 4552e11..7521084 100644 --- a/views/feed-status.php +++ b/views/feed-status.php @@ -1,4 +1,4 @@ - +
Last ping received from publisher | -= friendly_date($this->feed->push_last_ping_received, $tz) ?> | += format_date($this->feed->push_last_ping_received, $tz) ?> |
Last ping sent to subscriber | -= friendly_date($this->subscription->date_last_ping_sent, $tz) ?> | += format_date($this->subscription->date_last_ping_sent, $tz) ?> |
Last Response (from your server) |