Page 1 of 1

[App] Fake Time Server

Posted: Tue Jan 24, 2017 9:05 pm
by sectroyer
If you block internet access completely to your tizen tv you will block the ability for to get time from server. TV cat get time for user interface from EPG however it does NOT do that for console and other possible stuff also. Best way is to set up fake time server to have always accurate time in all places. Address of original time server is:
time.samsungcloudsolution.com
I suggest blocking all communication with this server and redirecting it to some local machine on which you have to be able to accept request:

Code: Select all

/openapi/timesync?client=TimeAgent/1.0 
You can use any language of your choosing to generate response to such request but I will post my PHP scripts.
On 32 bit system you can use:

Code: Select all

<?php
    $milliseconds = round(microtime(true) * 1000);
    $milliseconds1 = $milliseconds & 0xffffffff;
    $milliseconds2 = $milliseconds / 0x100000000;
    $mb_milliseconds = pack("LL", $milliseconds1,$milliseconds2);
    echo $mb_milliseconds;
    echo $mb_milliseconds;
?>
On 64 bit system it can be simplified to:

Code: Select all

<?php
    $milliseconds = round(microtime(true) * 1000);
    $mb_milliseconds = pack("LL", $milliseconds,$milliseconds);
    echo $mb_milliseconds;
?>
If you decide to use Apache you will have to make it treat files without extension as PHP, you can achieve that by adding to your httpd.conf those lines:

Code: Select all

<Files *>
    ForceType application/x-httpd-php
</Files>
<Files *\.*>
    ForceType None
</Files>

Re: [App] Fake Time Server

Posted: Fri Apr 20, 2018 8:48 am
by racocvr
Awesome!! Finally I fixed the youtube/webbrowser cert problems on my tv :D
I wish I had found this thread way earlier :D

Re: [App] Fake Time Server

Posted: Tue Jul 17, 2018 9:00 am
by setti
Do you know, how to call URL and set time manually from console?

OT: clock_settime() and settimeofday() and even builtin "date" fail with "Bad address", so I guess samsung uses something special.

Re: [App] Fake Time Server

Posted: Mon Aug 27, 2018 9:05 am
by sectroyer
setti wrote:
Tue Jul 17, 2018 9:00 am
Do you know, how to call URL and set time manually from console?
It's done AUTOMATICALLY, at least if you follow first post :) No command needed :lol:

Re: [App] Fake Time Server

Posted: Mon Aug 27, 2018 3:13 pm
by setti
sectroyer wrote:
Mon Aug 27, 2018 9:05 am
setti wrote:
Tue Jul 17, 2018 9:00 am
Do you know, how to call URL and set time manually from console?
It's done AUTOMATICALLY, at least if you follow first post :) No command needed :lol:
And without rebooting tv?

Re: [App] Fake Time Server

Posted: Mon Aug 27, 2018 4:19 pm
by zoelechat

Code: Select all

vconftool set -t int memory/menu/network/set_time 0 -f
systemctl restart vd-net-config.service
:ugeek: