Anyway the reason for my post is not to propagate about this event, though it is not a bad idea, but to share a little javascript. When I went to register for sessions, all the start times are listed in GMT and I wanted to be able to see the times in local timezone format. Here is a sample screenshot of how the start times are listed:
If you are using IE8, it is really easy to run custom javascript code on any page, you simply press F12 and go to the Script tab in the Developer Tools window and then run the following javascript code:
var sp = document.getElementById("schMeetings");
var timeSpans = sp.getElementsByTagName("span");
for (var i = 0; i < timeSpans.length; ++i)
{
if (timeSpans[i].id.indexOf("lblScheduletime") > 0)
{
var dtStr = timeSpans[i].innerText;
var dt = new Date(dtStr.substr(0, dtStr.length-"+00:00".length));
timeSpans[i].innerHTML += " [" + dt.toLocaleString() + "]";
}
}
Once I ran this javascript snippet, I can see the start times in my local timezone format as shown below:
I really like the new IE8 Developer Tools and this is just a sample of what you can do with custom javascript on any web page you visit.
Happy Coding,
Sonny
No comments:
Post a Comment