]> Lady’s Gitweb - Gitweb/blobdiff - static/js/lib/datetime.js
gitweb: remove title shortening heuristics
[Gitweb] / static / js / lib / datetime.js
index 0d1ee872922b04119a5207d2f663a55438dd246cc31641dd7f3f1b90b74c761b..e1a304eb57ff34ab8a1f53b682b59a5d55b63cdd4555e516ea287388ecdc8df2 100644 (file)
@@ -104,6 +104,21 @@ function formatTimezoneInfo(hours, minutes, sep) {
        return tzSign + padLeft(hours, 2, '0') + sep + padLeft(minutes, 2, '0');
 }
 
+/**
+ * translate 'utc' and 'local' to numerical timezone
+ * @param {String} timezoneInfo: might be 'utc' or 'local' (browser)
+ */
+function normalizeTimezoneInfo(timezoneInfo) {
+       switch (timezoneInfo) {
+       case 'utc':
+               return '+0000';
+       case 'local': // 'local' is browser timezone
+               return localTimezoneInfo();
+       }
+       return timezoneInfo;
+}
+
+
 /**
  * return date in local time formatted in iso-8601 like format
  * 'yyyy-mm-dd HH:MM:SS +/-ZZZZ' e.g. '2005-08-07 21:49:46 +0200'
This page took 0.218799 seconds and 4 git commands to generate.