[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.
Post Reply

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

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

Post by sectroyer »

Simple App that just gets Current Time directly from TV (based on hedaks findings)
Sample usage:

Code: Select all

 /getsetcurrenttimefromtv -n exeDSP 
Current Time: 1393671424
Current TimeZone Number: 9
Current TimeZone Offset: 60
The current date/time is: Sat Mar  1 10:57:04 2014
Current Time+Offset: 1393675024
The current date/time+offset is: Sat Mar  1 11:57:04 2014
To set the current time run this:

Code: Select all

/getsetcurrenttimefromtv -n exeDSP -s
EDIT:
New version. Added D/E support.

EDIT2:
Update. Added TimeZone support.

EDIT3:
New version. The app now also sets the time.

EDIT4:
Update. Added "date mode".

EDIT5:
Update. Added set2 option (forces +offset on C).

EDIT6:
Update. Removed set2 option (now app always adds +offset to current time). Add --utc switch.

EDIT7:
Update. Added "date mode" for correct time zone (-U)
If you want to use getsetcurrenttimefromtv instead of default date command add this line to $SYSROOT/etc/rc.sysinit:

Code: Select all

echo "alias date='getsetcurrenttimefromtv -n exeDSP -D'" >> /dtv/.ashrc
Or if you set your timezone correctly use this:

Code: Select all

echo "alias date='getsetcurrenttimefromtv -n exeDSP -U'" >> /dtv/.ashrc

EDIT8: 
Added support for additional display formats (-Y,-M,etc.)

You do not have the required permissions to view the files attached to this post.
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 https://pastebin.com 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: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: [App] Get Current Time From TV

Post by juusso »

this is great! we'll get rid out from ntpclient. I hope.

Does it set system time automatically or it just returns current time only?

ps. D series failed:
SpoilerShow

Code: Select all

 ./getcurrenttimefromtv -n exeDSP -d
pc=41cdb670 lr=41cdb65c sp=be923088 fp=5b0e13c
r0=fffffe00 r1=80
r2=1 r3=0
Error getting symbol: g_AppTV
symbol: _ZN4TCTv17GetSystemInfoTimeEPmi -> @0x00c10c44
Unable to continue. Addresses of g_AppTV and/or _ZN4TCTv17GetSystemInfoTimeEPmi not found.
Patching completed!
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: 6305
Joined: Wed May 04, 2011 5:10 pm

Re: [App] Get Current Time From TV

Post by sectroyer »

juuso wrote:this is great! we'll get rid out from ntpclient. I hope.

Does it set system time automatically or it just returns current time only?

ps. D series failed:
SpoilerShow

Code: Select all

 ./getcurrenttimefromtv -n exeDSP -d
pc=41cdb670 lr=41cdb65c sp=be923088 fp=5b0e13c
r0=fffffe00 r1=80
r2=1 r3=0
Error getting symbol: g_AppTV
symbol: _ZN4TCTv17GetSystemInfoTimeEPmi -> @0x00c10c44
Unable to continue. Addresses of g_AppTV and/or _ZN4TCTv17GetSystemInfoTimeEPmi not found.
Patching completed!
Yeah I knew it won't work on your TV ;) New version D/E support added. This app doesn't set anything. It just displays current time. On my TV is one hour off but that's probably due to summer time saving. We would have to investigate it further :)
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 https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
hedak
Posts: 81
Joined: Wed Jan 08, 2014 9:21 pm

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

Post by hedak »

Great! That saves my setting up the toolchain :D

Works as expected:

Code: Select all

# /mtd_rwarea/getcurrenttimefromtv -n exeDSP
Current Time: 1393666034
The current date/time is: Sat Mar  1 09:27:14 2014
Regarding the missing time offset (at my tv too), have a look at the functions

Code: Select all

TCTv::GetTimeZone(int *,int *,int)
and
CTimerUtil::GetLocalTime(PCTime::PTTime *, unsigned long)
We'll get that too 8-)
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

hedak wrote:Great! That saves my setting up the toolchain :D

Works as expected:

Code: Select all

# /mtd_rwarea/getcurrenttimefromtv -n exeDSP
Current Time: 1393666034
The current date/time is: Sat Mar  1 09:27:14 2014
Regarding the missing time offset (at my tv too), have a look at the functions

Code: Select all

TCTv::GetTimeZone(int *,int *,int)
and
CTimerUtil::GetLocalTime(PCTime::PTTime *, unsigned long)
We'll get that too 8-)
Fixed. Try new version :)
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 https://pastebin.com 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: 10129
Joined: Sun Mar 07, 2010 6:20 pm

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

Post by juusso »

D series:

Code: Select all

./getsetcurrenttimefromtv -n exeDSP
Current Time: 1393686119
Current TimeZone Number: 9
Current TimeZone Offset: 120
The current date/time is: Sat Mar  1 15:01:59 2014
Current Time+Offset: 1393693319
The current date/time+offset is: Sat Mar  1 17:01:59 2014
:)
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
User avatar
greenhorn
SamyGO Project Donor
Posts: 701
Joined: Wed Feb 15, 2012 3:05 pm
Location: Eastern Europe

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

Post by greenhorn »

Excellent!
SpoilerShow
# ./getsetcurrenttimefromtv -n exeDSP
Current Time: 1393689257
Current TimeZone Number: 9
Current TimeZone Offset: 120
The current date/time is: Sat Mar 1 15:54:17 2014
Current Time+Offset: 1393696457
The current date/time+offset is: Sat Mar 1 17:54:17 2014
#
TV: UE40F7000 - T-FXPDEUC-1115.0 - SamyGO Extensions on F series
TV: UE55ES7000S - T-ECPDEUC-2003.4 - SamyGO tool Right from USB - no develop account is needed
TV: UE40C6710 - T-VALDEUC 3011 - Hacking TV over Hotel mode (C650 T-VALDEUC-3009.2)
BD-Player: BD-E6100 - B-FIRBPEWWC 1063.3 - rooted, no more Cin@vi@
NAS: CIFS: MAG250 NFS: Playon!HD
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

Date mode added :) Let me know if you like it :D
juuso wrote:D series:

Code: Select all

.
....
Current TimeZone Number: 9
....
:)
BTW It looks that "TimeZone Number" is 9 for everyone so it's definitely not a "TimeZone Number" ;) If anyone knows what it is let me know.
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 https://pastebin.com 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: 10129
Joined: Sun Mar 07, 2010 6:20 pm

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

Post by juusso »

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
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
User avatar
greenhorn
SamyGO Project Donor
Posts: 701
Joined: Wed Feb 15, 2012 3:05 pm
Location: Eastern Europe

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

Post by greenhorn »

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
TV: UE40F7000 - T-FXPDEUC-1115.0 - SamyGO Extensions on F series
TV: UE55ES7000S - T-ECPDEUC-2003.4 - SamyGO tool Right from USB - no develop account is needed
TV: UE40C6710 - T-VALDEUC 3011 - Hacking TV over Hotel mode (C650 T-VALDEUC-3009.2)
BD-Player: BD-E6100 - B-FIRBPEWWC 1063.3 - rooted, no more Cin@vi@
NAS: CIFS: MAG250 NFS: Playon!HD

Post Reply

Return to “[C] Software”