]> git.pld-linux.org Git - projects/pld-builder.new.git/blob - PLD_Builder/script.js
move script.js, style.css to proper dir
[projects/pld-builder.new.git] / PLD_Builder / script.js
1
2 // update date stamps to reflect viewers timezone
3 function update_tz(t) {
4         var el, off, dt,
5                 collection = document.getElementsByTagName('span');
6         for (off in collection) {
7                 el = collection[off];
8                 if (el.id == 'tz') {
9                         dt = new Date(el.innerHTML).toString();
10                         // strip timezone name, it is usually wrong when not initialized
11                         // from TZ env, but reverse calculated from os data
12                         dt = dt.replace(/\s+\(.+\)/, "");
13                         // strip "GMT"
14                         dt = dt.replace(/GMT/, "");
15                         el.innerHTML = dt;
16                 }
17         }
18 }
19
20 window.onload = update_tz;
This page took 0.062379 seconds and 4 git commands to generate.