<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl">
 <binding id="timezone">
  <!-- Originally written by Nicol&aacute;s Lichtmier -->
  <implementation>
   <constructor>
     <![CDATA[
      var tm = /(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d) UTC$/.exec(this.firstChild.data);
      var date = new Date();
      date.setUTCFullYear(parseInt(tm[1], 10));
      date.setUTCMonth(parseInt(tm[2], 10) - 1);
      date.setUTCDate(parseInt(tm[3], 10));
      date.setUTCHours(parseInt(tm[4], 10));
      date.setUTCMinutes(parseInt(tm[5], 10));
      date.setUTCSeconds(0);
      function fmt(n) {
         if (n < 10) 
           return "0" + n;
         else
           return n;
      }
      this.firstChild.data = date.getFullYear() + "-" +
                         fmt(date.getMonth() + 1) + "-" +
                         fmt(date.getDate()) + " " +
                         fmt(date.getHours()) + ":" +
                         fmt(date.getMinutes()) + " LT";
      this.title = "Adjusted to local time zone"
     ]]>
   </constructor>
  </implementation>
 </binding>
</bindings>


