Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/351200 )

Change subject: Ensure that the Jenkins build timestamp is interpreted as UTC
......................................................................

Ensure that the Jenkins build timestamp is interpreted as UTC

Recently, either the Jenkins build timestamp or Chrome's Date.parse
implementation changed so that the timestamp is now incorrectly
interpreted as local time rather than UTC.  Firefox does the same.  Safari
still reads it as UTC.  The string is reporting the UTC time, but contains
no time zone information, so that its interpretation is ambiguous and
implementation-dependent in practice.

This appends a 'Z' to the date string so that it's interpreted correctly
across browser JS implementations.

Change-Id: I1955fde80906f9d5a1eaf50136020a1dfef1b787
---
M public_html/main.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/wikipedia-android-builds 
refs/changes/00/351200/1

diff --git a/public_html/main.js b/public_html/main.js
index 4a7a84b..ed33d2e 100644
--- a/public_html/main.js
+++ b/public_html/main.js
@@ -1,7 +1,7 @@
 $( function() {
     // Fetch the latest build's data
     $.get('runs/latest/meta.json').done( function( data ) {
-        var completed_on = new Date( data.completed_on );
+        var completed_on = new Date( data.completed_on + 'Z' );
         $( '#last-build-time' ).text( completed_on.toLocaleString(undefined, { 
timeZoneName: 'short' }) );
     });
 });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1955fde80906f9d5a1eaf50136020a1dfef1b787
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/wikipedia-android-builds
Gerrit-Branch: master
Gerrit-Owner: Mholloway <[email protected]>

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

Reply via email to