title: Timezone and DST problems on the latest 2014 Samsung Smart TV firmware
body: <p>I have 2 Samsung Smart TVs with the following model and firmware (from TV Menu->Support->Contact Samsung screen)</p>
  
  <ol>
  <li><p>2013:</p>
  
  <ul>
  <li>Model Code: UN32F5500</li>
  <li>Software Vesrion: T-MST12AKUC-1121.3</li>
  </ul></li>
  <li><p>2014:</p>
  
  <ul>
  <li>Model Code: UN40H6350</li>
  <li>Software Vesrion: T-MST14AKUC-1115.3</li>
  </ul></li>
  </ol>
  
  <p>The first problem (reproduced on both TVs, 2013 &amp; 2014) is the timezone is detection is wrong. The following code:</p>
  
  <pre><code>&lt;script type='text/javascript' src='./$MANAGER_WIDGET/Common/af/../webapi/1.0/deviceapis.js'&gt;&lt;/script&gt;
  // ...
  var timezone = deviceapis.tv.info.getTimeZone();
  window.alert('Timezone=' + timezone.timezone + ', dst=' + timezone.dst);
  </code></pre>
  
  <p>outputs the following:</p>
  
  <pre><code>Timezone=2, dst=0
  </code></pre>
  
  <p>This is <code>PL_TV_TIMEZONE_EASTERN</code> whereas I'm in the PST timezone, i.e. the following output is expected (<code>5</code> is <code>PL_TV_TIMEZONE_PACIFIC</code>, and daylight savings time is active now):</p>
  
  <pre><code>Timezone=5, dst=1
  </code></pre>
  
  <p>The most weird thing is that I'm not able to change the TV's timezone and DST setting. If I go to the TV's Menu->System->Time->Clock, then the 'DST' and 'Time Zone' settings are disabled (grayed out) even if the 'Clock Mode' setting is set to 'Manual'.</p>
  
  <p>The second problem is specific for the 2014 TV, it's not reproduced on the 2013 TV. The <code>Date</code>'s <code>getUTCHours()</code> method returns wrong result not taking into account Daylight Saving Time Shift. That is, the following code:</p>
  
  <pre><code>var now = new Date();
  window.alert('now: ' + now + '; getUTCHours()=' + now.getUTCHours());
  </code></pre>
  
  <p>produces the following output:</p>
  
  <pre><code>now: Fri Aug 08 2014 18:12:52 GMT-0800 (GMT), getUTCHours()=2
  </code></pre>
  
  <p>whereas the following is expected (as on my 2013 TV):</p>
  
  <pre><code>now: Fri Aug 08 2014 18:12:52 GMT-0700 (PDT); getUTCHours()=1
  </code></pre>
  
  <p>The current time (<code>Fri Aug 08 2014 18:12:52</code>) is correct but the DST offset is not taken into account in the returned GMT time's hour. Also, timezone code in the parenthesis is wrong (GMT instead of PDT or rather, taking into account timezone error described above, EDT or EST).
  I observed this problem just recently, I think it appeared after I made Software Update for the 2014 TV. I'd rather think this is a bug introduced in the latest version of the firmware.
  I tried to use <code>TV</code> plugin's (<code>clsid:SAMSUNG-INFOLINK-TV</code>) <code>GetDST()</code>, <code>GetTimeZone()</code>, <code>GetTimeZone_Offset()</code> functions, but all of them return incorrect results.</p>
  
  <p>I'd very appreciate any help provided.</p>
  
  <p>Thank you!</p>