Page 4 of 8

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

Posted: Sun Mar 02, 2014 1:46 pm
by sectroyer
greenhorn wrote:@sectroyer
If I apply the time patch after the movie seek patch, I loose the movie seek patch settings.
I fell of my chair... :D Why did you assume that they are in a way connected ? :D

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

Posted: Sun Mar 02, 2014 1:55 pm
by greenhorn
I have no idea.... I run movie seek as autostart script. Tv loads, and patch works. After that I applied the time patch and when I press left arrow or right, it tries to skip, but play at the same time.

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

Posted: Sun Mar 02, 2014 1:57 pm
by sectroyer
greenhorn wrote:I have no idea.... I run movie seek as autostart script. Tv loads, and patch works. After that I applied the time patch and when I press left arrow or right, it tries to skip, but play at the same time.
Try running it manually. You probably (somehow) disabled seekpatch. But just to warn you IMHO you should only use this patch to display time. Setting time will cause problems :)

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

Posted: Sun Mar 02, 2014 2:38 pm
by zoelechat
Just for testing and see which problems may happen, I'm setting time in first startup script...
For now I see no problem neither in seekpatches nor in any scheduled tasks.
Only "funny" thing that happens is that TV FTP server time is offset by 1hour (as expected)...+ 1month! :D
ftp> quote MDTM time.txt
213 20140202132709
Filezilla status:

Code: Select all

Timezone offsets: Server: 2422800 seconds. Local: 3600 seconds. Difference: -2419200 seconds.

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

Posted: Sun Mar 02, 2014 5:10 pm
by Mkò
It works on my tv

Code: Select all

/dtv/usb/sda1/SamyGO/opt/privateer/usr/sbin # ./getsetcurrenttimefromtv -n exeDS
P
Current Time: 1393776295
Current TimeZone Number: 9
Current TimeZone Offset: 60
The current date/time is: Sun Mar  2 16:04:55 2014
Current Time+Offset: 1393779895
The current date/time+offset is: Sun Mar  2 17:04:55 2014
/dtv/usb/sda1/SamyGO/opt/privateer/usr/sbin #
But i don't undesrtand the current time (first value shown) is wrong Sun Mar 2 16:04:55 2014
the real time is +1 17:04:55 so the real time is the time+offsset value.
So this mean that i have something set wrong?

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

Posted: Sun Mar 02, 2014 5:34 pm
by zoelechat
@Mko
First value is UTC and is not wrong at all, simply Universal Time
Second value is your localtime UTC+1

Nothing that hadn't already been discussed above ;)

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

Posted: Mon Mar 03, 2014 3:36 pm
by sectroyer
New version for C testers.
1) Unpack
2) Remove previous version of getsetcurrenttimefromtv
3) Copy new version of getsetcurrenttimefromtv to $SYSROOT/opt/privateer/bin/
4) Copy libc.so.6 to $SYSROOT/opt/lib/
5) Copy 99_99_TimeInfo.init to $SYSROOT/etc/init.d/
6) Find (on the net, cygwin, linux live cd) localtime file for your time zone and put it in $SYSROOT/etc/localtime
7) Reboot TV.

Now after samyGO completes loading you should have /dtv/tvTimeDiff.bin file and date should now show correct time/date information. This way of "setting" is completely different from previously used techniques. It doesn't interfere in any way with time used by TV and set's correct time values for all samyGO applications :) Please test and post your results :)

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

Posted: Mon Mar 03, 2014 6:48 pm
by zoelechat
I found something strange, is it normal that when 'localtime' file exists, returned values are offset by timezone offset?
For example, first instance of -U -D (I didn't use -s or -u at all before):

Code: Select all

./getsetcurrenttimefromtv -n exeDSP -U
Mon Mar  3 17:37:08 2014
./getsetcurrenttimefromtv -n exeDSP -D
Mon Mar  3 18:37:12 2014
Creation of localtime file:

Code: Select all

cp /mtd_rwcommon/CSP_TimeZone /tmp
Second instance of -U -D:

Code: Select all

./getsetcurrenttimefromtv -n exeDSP -U
Mon Mar  3 18:37:19 2014
./getsetcurrenttimefromtv -n exeDSP -D
Mon Mar  3 19:37:21 2014
See that values are now offset by +1hour (UTC+1, UTC+2), shouldn't they have the same offset as in first instance? (UTC, UTC+1)

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

Posted: Mon Mar 03, 2014 6:54 pm
by sectroyer
zoelechat wrote:I found something strange, is it normal that when 'localtime' file exists, returned values are offset by timezone offset?
For example, first instance of -U -D (I didn't use -s or -u at all before):

Code: Select all

./getsetcurrenttimefromtv -n exeDSP -U
Mon Mar  3 17:37:08 2014
./getsetcurrenttimefromtv -n exeDSP -D
Mon Mar  3 18:37:12 2014
Creation of localtime file:

Code: Select all

cp /mtd_rwcommon/CSP_TimeZone /tmp
Second instance of -U -D:

Code: Select all

./getsetcurrenttimefromtv -n exeDSP -U
Mon Mar  3 18:37:19 2014
./getsetcurrenttimefromtv -n exeDSP -D
Mon Mar  3 19:37:21 2014
See that values are now offset by +1hour (UTC+1, UTC+2), shouldn't they have the same offset as in first instance? (UTC, UTC+1)
You should either use -U or -D. You should NEVER use both :) if you copy localtime then the only correct time will be -U which will show time in your timezone :) Basically -D shows correct time when you don't have localtime copied and -U correct time when you do have localtime :)

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

Posted: Mon Mar 03, 2014 6:57 pm
by zoelechat
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? :)

edit: ok, understood ;)