Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/221626

Change subject: New global variable, $wgCargo24HourTime
......................................................................

New global variable, $wgCargo24HourTime

Change-Id: I528ee0c61ced6d99397b6b07a1eedbe40588eede
---
M Cargo.php
M CargoQueryDisplayer.php
2 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/26/221626/1

diff --git a/Cargo.php b/Cargo.php
index a168cac..84db1a3 100644
--- a/Cargo.php
+++ b/Cargo.php
@@ -258,6 +258,7 @@
 $wgCargoDBpassword = null;
 $wgCargoDefaultQueryLimit = 100;
 $wgCargoMaxQueryLimit = 5000;
+$wgCargo24HourTime = false;
 
 $wgCargoMapClusteringMinimum = 80;
 
diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php
index 18f99e5..c7544fc 100644
--- a/CargoQueryDisplayer.php
+++ b/CargoQueryDisplayer.php
@@ -208,8 +208,12 @@
                        }
 
                        // It's a Datetime - add time as well.
-                       // @TODO - have some variable for 24-hour time display?
-                       $timeText = date( 'g:i:s A', $seconds );
+                       global $wgCargo24HourTime;
+                       if ( $wgCargo24HourTime ) {
+                               $timeText = date( 'G:i:s', $seconds );
+                       } else {
+                               $timeText = date( 'g:i:s A', $seconds );
+                       }
                        return "$dateText $timeText";
                }
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/221626
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I528ee0c61ced6d99397b6b07a1eedbe40588eede
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to