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

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 »

zoelechat wrote: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...) ;)
On linux you don't set a time zone using any api. You do it this way:

Code: Select all

ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime
If you want to use your time zone and not UTC set time using -u switch and make correct link. I have one TV configured this way :)
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 !!!!
zoelechat
SamyGO Moderator
Posts: 8615
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'd already tried to set timezone but starting with wrong UTC was not compliant...

This --utc switch does the job perfectly, thanks! :)
(Now files written by TV have the right date/time, no more "1 hour later" offset ;) )
I do NOT receive any PM. Please use forum.
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 »

zoelechat wrote:I'd already tried to set timezone but starting with wrong UTC was not compliant...

This --utc switch does the job perfectly, thanks! :)
(Now files written by TV have the right date/time, no more "1 hour later" offset ;) )
It really depends what you want to achieve ;) Now you have wrong time in date :D
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 !!!!
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

sectroyer wrote:It really depends what you want to achieve ;)
Certainly ;)
sectroyer wrote:Now you have wrong time in date :D
No, UTC is Universal, Unique and due to be the same all over the world with no offset, now it is correctly set all times and timezones are correct. :)
I do NOT receive any PM. Please use forum.
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 »

zoelechat wrote:
sectroyer wrote:It really depends what you want to achieve ;)
Certainly ;)
sectroyer wrote:Now you have wrong time in date :D
No, UTC is Universal, Unique and due to be the same all over the world with no offset, now it is correctly set all times and timezones are correct. :)
I know it's universal. If you have set up the timezone correctly than yes you have everything okay. What is your TV? I know on C setting timezone is not trivial ;) It's quite easy on E. Not sure about others :)
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 !!!!
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

sectroyer wrote:I know it's universal. If you have set up the timezone correctly than yes you have everything okay. What is your TV? I know on C setting timezone is not trivial ;) It's quite easy on E. Not sure about others :)
My TV is E and I didn't succeed in setting any timezone yet, I don't want to touch to TV protected files ('localtime') until I'm really sure of what I'm doing (maybe you can lead me to a safe step-by-step procedure? :) )
I just tried local 'export TZ' that gave me expected result and I noticed that TV files through Samba server are now sync to client time, even without timezone set...
I do NOT receive any PM. Please use forum.
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 »

export TZ seems to also work. However on E you can notice something like this:

Code: Select all

ls -l /etc/localtime 
lrwxrwxrwx    1 root     0               19 Feb 18  2013 /etc/localtime -> ../tmp/CSP_TimeZone
so /etc/localtime points to not existent file in /tmp/ :) You can just copy correct local time to that place.
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 !!!!
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

Yeah, export TZ works but it affects only local (for example launched in a script, timezone concerns only script itself :) )
Nice, I didn't notice that localtime thing, now I have to find a timezone file to put in /tmp...

edit: ok, found (no Linux there but got one in Cygwin). Works perfectly! ;)

Code: Select all

date -u
Sun Mar  2 12:11:09 UTC 2014
date
Sun Mar  2 13:11:09 CET 2014
I do NOT receive any PM. Please use forum.
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 »

On C (D?) it is not so easy. There is no /etc/localtime so export TZ seems the only option. However you can do one more thing (I did it :)). The location of local time is stored in libc. You can mount copy original libc to $SYSROOT/opt/lib/libc.so.6. Then you open it in any hex editor of your choosing and change strings /etc/localtime to /dtv/locatime. The last thing is to

Code: Select all

mount -o bind $SYSROOT/opt/lib/libc.so.6 /lib/libc.so.6
And finally copy correct localtime file to /dtv/.
Now you have correct timezone on C(D?).
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
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 »

@sectroyer
If I apply the time patch after the movie seek patch, I loose the movie seek patch settings.
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”