File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change 1717 </ head >
1818 < body >
1919 < script >
20- now = moment ( ) ;
20+ urlParams = new URLSearchParams ( window . location . search ) ;
21+ if ( urlParams . has ( "time" ) === true ) {
22+ time = moment ( urlParams . get ( "time" ) , moment . ISO_8601 ) ;
23+ } else {
24+ time = moment ( ) ;
25+ }
2126
22- now_brussels = moment . tz ( now , "Europe/Brussels " ) . format ( ) ;
23- now_paris = moment . tz ( now , "Europe/Paris " ) . format ( ) ;
24- now_london = moment . tz ( now , "Europe/London " ) . format ( ) ;
25- now_utc = moment . tz ( now , "UTC " ) . format ( ) ;
27+ timeUTC = moment . tz ( time , "UTC " ) . format ( ) ;
28+ timeLondon = moment . tz ( time , "Europe/London " ) . format ( ) ;
29+ timeParis = moment . tz ( time , "Europe/Paris " ) . format ( ) ;
30+ timeBrussels = moment . tz ( time , "Europe/Brussels " ) . format ( ) ;
2631
2732 document . body . innerHTML =
28- "UTC : " + now_utc + "<br>" +
29- "Europe/London : " + now_london + "<br>" +
30- "Europe/Paris : " + now_paris + "<br>" +
31- "Europe/Brussels : " + now_brussels ;
33+ "UTC : " + timeUTC + "<br>" +
34+ "Europe/London : " + timeLondon + "<br>" +
35+ "Europe/Paris : " + timeParis + "<br>" +
36+ "Europe/Brussels : " + timeBrussels ;
3237 </ script >
3338 </ body >
3439</ html >
You can’t perform that action at this time.
0 commit comments