admin管理员组

文章数量:1316016

I have 2 Samsung Smart TVs with the following model and firmware (from TV Menu->Support->Contact Samsung screen)

  1. 2013:

    • Model Code: UN32F5500
    • Software Vesrion: T-MST12AKUC-1121.3
  2. 2014:

    • Model Code: UN40H6350
    • Software Vesrion: T-MST14AKUC-1115.3

The first problem (reproduced on both TVs, 2013 & 2014) is the timezone is detection is wrong. The following code:

<script type='text/javascript' src='./$MANAGER_WIDGET/Common/af/../webapi/1.0/deviceapis.js'></script>
// ...
var timezone = deviceapis.tv.info.getTimeZone();
window.alert('Timezone=' + timezone.timezone + ', dst=' + timezone.dst);

outputs the following:

Timezone=2, dst=0

This is PL_TV_TIMEZONE_EASTERN whereas I'm in the PST timezone, i.e. the following output is expected (5 is PL_TV_TIMEZONE_PACIFIC, and daylight savings time is active now):

Timezone=5, dst=1

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'.

The second problem is specific for the 2014 TV, it's not reproduced on the 2013 TV. The Date's getUTCHours() method returns wrong result not taking into account Daylight Saving Time Shift. That is, the following code:

var now = new Date();
window.alert('now: ' + now + '; getUTCHours()=' + now.getUTCHours());

produces the following output:

now: Fri Aug 08 2014 18:12:52 GMT-0800 (GMT), getUTCHours()=2

whereas the following is expected (as on my 2013 TV):

now: Fri Aug 08 2014 18:12:52 GMT-0700 (PDT); getUTCHours()=1

The current time (Fri Aug 08 2014 18:12:52) 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 TV plugin's (clsid:SAMSUNG-INFOLINK-TV) GetDST(), GetTimeZone(), GetTimeZone_Offset() functions, but all of them return incorrect results.

I'd very appreciate any help provided.

Thank you!

I have 2 Samsung Smart TVs with the following model and firmware (from TV Menu->Support->Contact Samsung screen)

  1. 2013:

    • Model Code: UN32F5500
    • Software Vesrion: T-MST12AKUC-1121.3
  2. 2014:

    • Model Code: UN40H6350
    • Software Vesrion: T-MST14AKUC-1115.3

The first problem (reproduced on both TVs, 2013 & 2014) is the timezone is detection is wrong. The following code:

<script type='text/javascript' src='./$MANAGER_WIDGET/Common/af/../webapi/1.0/deviceapis.js'></script>
// ...
var timezone = deviceapis.tv.info.getTimeZone();
window.alert('Timezone=' + timezone.timezone + ', dst=' + timezone.dst);

outputs the following:

Timezone=2, dst=0

This is PL_TV_TIMEZONE_EASTERN whereas I'm in the PST timezone, i.e. the following output is expected (5 is PL_TV_TIMEZONE_PACIFIC, and daylight savings time is active now):

Timezone=5, dst=1

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'.

The second problem is specific for the 2014 TV, it's not reproduced on the 2013 TV. The Date's getUTCHours() method returns wrong result not taking into account Daylight Saving Time Shift. That is, the following code:

var now = new Date();
window.alert('now: ' + now + '; getUTCHours()=' + now.getUTCHours());

produces the following output:

now: Fri Aug 08 2014 18:12:52 GMT-0800 (GMT), getUTCHours()=2

whereas the following is expected (as on my 2013 TV):

now: Fri Aug 08 2014 18:12:52 GMT-0700 (PDT); getUTCHours()=1

The current time (Fri Aug 08 2014 18:12:52) 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 TV plugin's (clsid:SAMSUNG-INFOLINK-TV) GetDST(), GetTimeZone(), GetTimeZone_Offset() functions, but all of them return incorrect results.

I'd very appreciate any help provided.

Thank you!

Share Improve this question asked Aug 9, 2014 at 2:40 Nikolay MamaevNikolay Mamaev 1,4741 gold badge12 silver badges21 bronze badges 2
  • Whatever Date.prototype.toString returns is pletely implementation dependent, so you should ignore that and use the get* methods. It seems that you can only select the time zone (which seems to be region based, not actually time zone based) if you set the clock to auto. – RobG Commented Aug 9, 2014 at 3:28
  • @RobG, thank you for reply! I actually use get* methods (in the sample code from the question I use getUTCHours()), I (indirectly) use the toString() method just for illustration purposes. The problem is those getUTC* methods I'm using also return incorrect results. I can't use timezone provided by the system as well. – Nikolay Mamaev Commented Aug 9, 2014 at 3:35
Add a ment  | 

3 Answers 3

Reset to default 3

I just contacted Samsung support, and they suggested that the Input had to be set to "TV" before entering setup to have access to the Timezone and the other parameters.

Well, it absolutely sounds like a firmware problem to me. I'd consider taking it up with their technical support. (Good luck.)

If time zone issues are important for your app and you're looking for a workaround, consider providing your own time zone data with your application. Assuming you can run any JavaScript you want, you should be able to use moment.js with the moment-timezone add-on.

Samsung supplied me with a link for my model that had me reset the Country Code to Virgin Islands, US, then back to US.

This resets the apps & Timezone/date.

This fixed the issue for me.

If you have different models, you might want to contact Samsung Chat to get a link for yours.

How to reset Country Code (Timezone) on my model per Samsung http://support-us.samsung./cyber/popup/iframe/pop_troubleshooting_fr.jsp?idx=428459&modelname=UN55F6300AF&modelcode=UN55F6300AFXZA

本文标签: javascriptTimezone and DST problems on the latest 2014 Samsung Smart TV firmwareStack Overflow