Page 5 of 8

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

Posted: Mon Mar 03, 2014 6:59 pm
by sectroyer
zoelechat wrote:I know but look carefully at second instance of -U, when localtime file exists it is no longer UTC but UTC+1, -U should always return UTC, no? :)
No :) It just shows data without adding timezone offset. When you put localtime file the system adds the offset :) Besides look few posts earlier. We are working on a new (safer) way of setting time which will always show correct time for your time zone :)

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

Posted: Mon Mar 03, 2014 7:11 pm
by zoelechat
Ok :)
Anyway, even if "wrong" values are shown, good ones are still set using -s / -u

Code: Select all

./getsetcurrenttimefromtv -n exeDSP -u
Current Time: 1393869864
Current TimeZone Number: 9
Current TimeZone Offset: 60
The current date/time is: Mon Mar  3 19:04:24 2014
Current Time+Offset: 1393873464
The current date/time+offset is: Mon Mar  3 20:04:24 2014
Succesfully set current time.

Code: Select all

date -u
Mon Mar  3 18:04:38 UTC 2014

Code: Select all

date
Mon Mar  3 19:04:30 CET 2014
Just a matter of offset ;)

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

Posted: Mon Mar 03, 2014 7:18 pm
by sectroyer
You run:

Code: Select all

./getsetcurrenttimefromtv -n exeDSP -u
Running with -u or -s shows information that are used for debug purposes only. If you want to see "good" time use either -U or -D. Besides this line:

Code: Select all

The current date/time is: Mon Mar  3 19:04:24 2014
Shows correct time for your timezone :)

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

Posted: Mon Mar 03, 2014 7:26 pm
by zoelechat
Understood and no complaint about nothing :)
Just noticing that if localtime file exists, values shown by -D -U are offset by localtime ;)

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

Posted: Fri Mar 14, 2014 11:02 am
by miazza
On my ES8000 I'm getting error:

Code: Select all

VDLinux#> ./getsetcurrenttimefromtv -n exeDSP -s
cannot write code, error!
Segmentation fault

Code: Select all

VDLinux#>  ./getsetcurrenttimefromtv -n exeDSP -d -s
pc=420334dc lr=420334c8 sp=beb98e80 fp=85e0440
r0=fffffe00 r1=80
r2=1 r3=0
Error getting symbol: g_AppTV
symbol: g_pAppTV -> @0x085dd2e8
Error getting symbol: _ZN4TCTv11GetTimeZoneEPiS0_i
symbol: _ZN4TCTv11GetTimeZoneEPiS0_ -> @0x0108a06c
symbol: _ZN4TCTv17GetSystemInfoTimeEPmi -> @0x0108a380
symbol: adbg_CheckSystem -> @0x0465ebc0
Patched adbg_CheckSystem at @0x0465ebc0
symbol: mprotect -> @0x41bb9c80
Stack: @0xbeb7c000 - @0xbeb9d000
pc=108a06c lr=712cc sp=be8a4920 fp=23324
r0=be8a4920 r1=7152e
r2=c6bb0 r3=0
cannot write code, error!
Patching completed!
Segmentation fault
I have saved it in :

Code: Select all

VDLinux#> cd /mtd_rwcommon/Time_Set/
VDLinux#> ls
getsetcurrenttimefromtv
VDLinux#> ./getsetcurrenttimefromtv -n exeDSP -s
cannot write code, error!
Segmentation fault
I tried to use it with ntpclient active and it works but if ntpclient is disabled, after TV reboot I get the above errors.

Can you help in debugging ?

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

Posted: Fri Mar 14, 2014 11:12 am
by sectroyer
Without ntp do you have correct time and date on your tv? Not the samygo:)

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

Posted: Fri Mar 14, 2014 1:01 pm
by miazza
Without NTP the data and time on TV is set wrong to 1970.
If I run ntpclient than it is correct but I do not like ntpclient for other issues on Smarthub on my TV.

with ntpclient active:

Code: Select all

VDLinux#> ./getsetcurrenttimefromtv -n exeDSP -u
Current Time: 1394812861
Current TimeZone Number: 9
Current TimeZone Offset: 60
The current date/time is: Fri Mar 14 16:01:01 2014
Current Time+Offset: 1394816461
The current date/time+offset is: Fri Mar 14 17:01:01 2014
Succesfully set current time.

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

Posted: Fri Mar 14, 2014 6:45 pm
by sectroyer
miazza wrote:Without NTP the data and time on TV is set wrong to 1970.
If I run ntpclient than it is correct but I do not like ntpclient for other issues on Smarthub on my TV.

with ntpclient active:

Code: Select all

VDLinux#> ./getsetcurrenttimefromtv -n exeDSP -u
Current Time: 1394812861
Current TimeZone Number: 9
Current TimeZone Offset: 60
The current date/time is: Fri Mar 14 16:01:01 2014
Current Time+Offset: 1394816461
The current date/time+offset is: Fri Mar 14 17:01:01 2014
Succesfully set current time.
Stop telling lies :P I am not asking about the time on samygo, ssh, telnet, http, ftp, etc. I want to know whether (without running any tools) time on your TV (use the remote ;)) is correct? Also what tv model are you using?

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

Posted: Sat Mar 15, 2014 10:46 am
by miazza
OK Sorry. If I press the info button on the remote the time is correct in the info bar.

My TV is 46ES8000.

In summary:

No root (no samygo): Time on info-bar is correct
root (samygo) non ntpclient: Time is correct in info-bar but time is wrong in the system
root (samygo + ntpclient: Time is correct in info-bar and in the system

I hope this clarify my situation.

PS: every time I switch off the TV, the bin getsetcurrenttimefromtv is set to dimension 0 and I need to ftp it again in order to try using it.

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

Posted: Sat Mar 15, 2014 10:48 am
by sectroyer
Yeah. You use the app for Setting the time but (without ntp) does it display correct time?