In the block "Tranquility Server" server time does not correctly.
It depends on the time zone selected by the user.

CommentFileSizeAuthor
#1 incorrect_server_time-2231267.patch793 bytes6run0

Comments

6run0’s picture

StatusFileSize
new793 bytes
0mni’s picture

Thanks 6RUN0, this is the patch I used.

diff --git a/eve_api.module b/eve_api.module
index 977d298..c5b7e44 100644
--- a/eve_api.module
+++ b/eve_api.module
@@ -424,14 +424,17 @@
  */
 function _eve_api_tranquility_block() {
   $status = _eve_api_get_eve_players();
+  $output = array();
 
   if ($status !== FALSE) {
-    $output['#markup'] = 'Players  Online: ' . $status . '<br />' . 'Server Time: ' . date('H:i');
+    $output['#markup'] = t('Players Online: !status', array('!status' => $status));
   }
   else {
-    $output['#markup'] = 'Tranquility Server Down<br />' . 'Server Time: ' . date('H:i');
+    $output['#markup'] = t('Tranquility Server Down');
   }
 
+  $output['#markup'] .= '<br />' . t('Server Time: !time', array('!time' => format_date(time(), 'custom', 'H:i', 'UTC')));
+
   return $output;
 }
 
0mni’s picture

Status: Reviewed & tested by the community » Fixed
0mni’s picture

Assigned: Unassigned » 0mni

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.