[App] Get/Set Current Time From TV C/D/E

Here are software that related with Samsung C series TVs, applications, programs that will run in your TV or computer...:!:This forum is NOT FOR USER QUESTIONS or Problems.

User avatar
juusso
SamyGO Moderator
Posts: 10124
Joined: Sun Mar 07, 2010 6:20 pm

Re: [App] Get/Set Current Time From TV C/D/E

Post by juusso »

Code: Select all

export TZ=GMT+2
./getsetcurrenttimefromtv -n exeDSP -s
maybe... or maybe not? or CET, or CET+1, no idea :D
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

sectroyer
Official SamyGO Developer
Posts: 5928
Joined: Wed May 04, 2011 5:10 pm

Re: [App] Get/Set Current Time From TV C/D/E

Post by sectroyer »

greenhorn wrote:I've got this:
SpoilerShow
# date
Thu Jan 1 00:07:04 UTC 1970
# ./getsetcurrenttimefromtv -n exeDSP -d -s
pc=42a64158 lr=42a67928 sp=bec1a8e0 fp=bec1a934
r0=fffffe00 r1=0
r2=1 r3=0
symbol: g_AppTV -> @0x03bf172c
symbol: _ZN4TCTv11GetTimeZoneEPiS0_i -> @0x0003f008
symbol: _ZN4TCTv17GetSystemInfoTimeEPmi -> @0x000398f4
Error getting symbol: adbg_CheckSystem
Adding libc addr to found symaddress @0x000c81a0 + @0x42c2d000 = @0x42cf51a0
symbol: mprotect -> @0x42cf51a0
Stack: @0xbec06000 - @0xbec1b000
pc=42a64158 lr=42a67928 sp=bec1a8e0 fp=bec1a934
r0=fffffe00 r1=0
r2=1 r3=0
Executing injection code at 0xbec1a850
Found new time value.
Current Time: 1393698757
Current TimeZone Number: 9
Current TimeZone Offset: 120
The current date/time is: Sat Mar 1 18:32:37 2014
Current Time+Offset: 1393705957
The current date/time+offset is: Sat Mar 1 20:32:37 2014
Succesfully set current time.
Patching completed!
# date
Sat Mar 1 18:32:40 UTC 2014
#
What am I doing wrong? If ask date, it gives GMT time. It should GMT+2
Use latest version with -S switch. It will add time offset.
juuso wrote:Omg :o
SpoilerShow

Code: Select all

root@[TV] /> date
Thu Jan  1 02:33:44 UTC 1970

Code: Select all

 getsetcurrenttimefromtv -n exeDSP -d -s
pc=41cdb670 lr=41cdb65c sp=befbc088 fp=5b0e13c
r0=fffffe00 r1=80
r2=1 r3=0
Error getting symbol: g_AppTV
symbol: g_pAppTV -> @0x05afe818
Error getting symbol: _ZN4TCTv11GetTimeZoneEPiS0_i
symbol: _ZN4TCTv11GetTimeZoneEPiS0_ -> @0x00c10778
symbol: _ZN4TCTv17GetSystemInfoTimeEPmi -> @0x00c10c44
Error getting symbol: adbg_CheckSystem
symbol: mprotect -> @0x419b2be0
Stack: @0xbefa8000 - @0xbefbd000
pc=41cdb670 lr=41cdb65c sp=befbc088 fp=5b0e13c
r0=fffffe00 r1=80
r2=1 r3=0
Executing injection code at 0xbefbbff8
Found new time value.
Current Time: 1393697879
Current TimeZone Number: 9
Current TimeZone Offset: 120
The current date/time is: Sat Mar  1 18:17:59 2014
Current Time+Offset: 1393705079
The current date/time+offset is: Sat Mar  1 20:17:59 2014
Succesfully set current time.
Patching completed!

Code: Select all

root@[TV] /> date
Sat Mar  1 20:18:04 UTC 2014
juuso, juuso... I thought you used it hours ago ;)

However I would like to warn all of you that setting time using my tool, ntpclient or any other tool can cause problems. For instance it can cancel all of your scheduled recordings. It's much better to use "date mode" (-D) and put alias in /dtv/.ashrc
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

User avatar
juusso
SamyGO Moderator
Posts: 10124
Joined: Sun Mar 07, 2010 6:20 pm

Re: [App] Get/Set Current Time From TV C/D/E

Post by juusso »

:)
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

M11
SamyGO Project Donor
Posts: 280
Joined: Fri Aug 03, 2012 6:00 pm

Re: [App] Get/Set Current Time From TV C/D/E

Post by M11 »

I have a stupid question, why are you all so excited about time? :-)
And one more serious question, does the TV report time in seconds or milliseconds? I saw that Netflix app checks time and I did read in other forums that it refuses to start if time doesn't match server time.
F9000 + SEK-3500U

sectroyer
Official SamyGO Developer
Posts: 5928
Joined: Wed May 04, 2011 5:10 pm

Re: [App] Get/Set Current Time From TV C/D/E

Post by sectroyer »

M11 wrote:I have a stupid question, why are you all so excited about time? :-)
And one more serious question, does the TV report time in seconds or milliseconds? I saw that Netflix app checks time and I did read in other forums that it refuses to start if time doesn't match server time.
I will say it that way. TV uses timers. For some timers it uses seconds, for some milliseconds and for other minutes. I assume the same is (as with everything on these TVs) with time :) There is probably 2 or 3 ways of getting time from TV. Not sure which way Netflix app uses. This app get's time in seconds :)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

zoelechat
Official SamyGO Developer
Posts: 8445
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] Get/Set Current Time From TV C/D/E

Post by zoelechat »

Is it a wanted behavior that app sets localtime as UTC?
For example my localtime is UTC+1

Code: Select all

date
Sat Mar  1 22:24:09 UTC 2014

Code: Select all

date -u
Sat Mar  1 22:24:09 UTC 2014
date and date -u give the same result while date -u should give one hour less, right? :)

This can't be solved by any export TZ since UTC is wrong.
More, I see that all files on TV samba server are offset by one hour too much, since Windows corrects time that is already corrected...
I do NOT receive any PM. Please use forum.

sectroyer
Official SamyGO Developer
Posts: 5928
Joined: Wed May 04, 2011 5:10 pm

Re: [App] Get/Set Current Time From TV C/D/E

Post by sectroyer »

For now the app sets current time to whatever timezone it was before you did run the app. Probably we should set time zone based on info from the app... Maybe tomorrow ;)
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

zoelechat
Official SamyGO Developer
Posts: 8445
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] Get/Set Current Time From TV C/D/E

Post by zoelechat »

What I supposed is simply set UTC as real UTC (there's only one UTC, expected by date -u command)

Code: Select all

Current Time: 1393708266
...and apply your retrieved offset to TimeZone, instead of adding it to UTC (expected by date command)

Code: Select all

Current Time+Offset: 1393711866
Hoping that is clear :mrgreen:
I do NOT receive any PM. Please use forum.

sectroyer
Official SamyGO Developer
Posts: 5928
Joined: Wed May 04, 2011 5:10 pm

Re: [App] Get/Set Current Time From TV C/D/E

Post by sectroyer »

zoelechat wrote:What I supposed is simply set UTC as real UTC (there's only one UTC, expected by date -u command)

Code: Select all

Current Time: 1393708266
...and apply your retrieved offset to TimeZone, instead of adding it to UTC (expected by date command)

Code: Select all

Current Time+Offset: 1393711866
Hoping that is clear :mrgreen:
Doesn't work correctly :) Read post before. One user already had a problem with. Setting "real" UTC doesn't give you correct time/date when you don't set timezone at the same time.
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on http://ctrlv.it/ Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

zoelechat
Official SamyGO Developer
Posts: 8445
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: [App] Get/Set Current Time From TV C/D/E

Post by zoelechat »

I precisely read posts above and that's why I asked the question "is it a wanted behavior?" :)
Isn't it necessary to set timezone when you're not in UTC zone? (maybe your app should do it automatically? Using this famous offset)
What I see is just that "date -u" value is wrong, giving localtime instead of expected UTC time. I don't know if that can really be a problem (especially when sync is needed...) ;)
I do NOT receive any PM. Please use forum.

Post Reply

Return to “[C] Software”