Skip to main content

how to get recording start time in IST format?

11 replies [Last post]
swati_V
Offline
Joined: 2012-07-09
Points: 0

hi,
i am working on DVR app. in dvrtest.java-> doRecording() method returns strattime
in gmt format which is lagging by 11hrs from current time in India. i tried to convert this gmt time to ist but it failed.
is there any specific setting in ocap for time?
how to convert time to ist?
thanx in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
swati_V
Offline
Joined: 2012-07-09
Points: 0

SITP.SI.STT.ENABLED=FALSE
in mpeenv.ini file , this property is set to FALSE. but to enable parsing of the System Time Table to allow the stack to handle the update of UTC time based on the STT, it should be set to TRUE.
but SITP.SI.STT.ENABLED=TRUE leads to RI crash!
Any suggestion on this?

smaynard
Offline
Joined: 2009-01-27
Points: 0

This should be filed as an issue. Please capture logs of the offense and attach them to the issue.

swati_V
Offline
Joined: 2012-07-09
Points: 0

hi,
Following my previous post, now i ahve got the file which sets the timezone in ocap.
its GfDatabaseFile.xml.

code:

here "/lw=" refers to gmt -6:00
but i am not getting how to change the vlaue of timezone property to get timezone
of gmt +5:30.
i tried placing "AUo" but it is for gmt +6:30
please reply

Thank you

smaynard
Offline
Joined: 2009-01-27
Points: 0

base64 "AUo" == 330 minutes == 5 hours, 30 minutes

I think you must also consider the value of the daylight_savings variable if you're getting 6 hours, 30 minutes

From the CCIF spec:
daylight_savings (Type 1 Version 2 and above)

daylight_savings()
{
    daylight_savings_control (8 bits)

    if(daylight_savings_control == 0x02)
    {
        daylight_savings_delta (8 bits)
        daylight_savings_entry_time (32 bits)
        daylight_savings_exit_time (32 bits)
    }
}

The Card derives information needed to build the daylight_savings_control daylight_savings feature from the configuration messages received from the Headend.
0x00 Reserved
0x01 Do not use daylight savings time
0x02 Use daylight savings
0x03-0xFF Reserved

Daylight savings delta time in number of minutes.
Daylight savings entry time given as time lapsed since 12 AM Jan 6, 1980, in units of GPS seconds.
Daylight savings exit time given as time lapsed since 12 AM Jan 6, 1980, in units of GPS seconds. The value of this parameter shall be greater than the value of daylight_savings_entry_time.

swati_V
Offline
Joined: 2012-07-09
Points: 0

hi,
thanks for replying!
i am not getting how to edit daylight time setting in ocap. unfortunately, there is very few documentation available on net related to ocap-ri.
can you please help me some more to solve this issue?

thanks,
swati
(India)

smaynard
Offline
Joined: 2009-01-27
Points: 0

The value is a base64 encoded:

grep daylight_savings GfDatabaseFile.xml yields the current value is:

daylight_savings value="Ajw4x2gQOgEtEA=="

One can observe the current binary value by:

echo "Ajw4x2gQOgEtEA==" | base64 --decode > ds.bin
hexdump ds.bin
000000 02 3c 38 c7 68 10 3a 01 2d 10
00000a

The first 8 bits (02) is the daylight_savings_control (use DST in this case).
The second 8 bits (3c) is the daylight_saving_delta (60 minutes in this case).
The next 32 bits (38 c7 68 10) is the DST start point
The last 32 bits (3a 01 2d 10) is the DST end point

To change the DST structure to turn off DST, hexedit the above ds.bin to be:

000000 01 00 00 00 00 00 00 00 00 00
00000a

and then encode it:
base64 ds.bin
which outputs "AQAAAAAAAAAAAAAA=="

Replace the daylight_savings value="Ajw4x2gQOgEtEA==" with value="AQAAAAAAAAAAAAAA=="

swati_V
Offline
Joined: 2012-07-09
Points: 0

thank you so much for this explaination. now i am quite clear about how do we get value of time-zone and daylight-savings.
i tried replacing the daylight_savings value="Ajw4x2gQOgEtEA==" with value="AQAAAAAAAAAAAAAA=="

but daylight_savings value="Ajw4x2gQOgEtEA==" (16 digit)
and daylight_savings value="AQAAAAAAAAAAAAAA==" (18 digit)
so i treid with
daylight_savings value="AQAAAAAAAAAAAA==" (14 digit)

but it didnt woek for me..

GfDatabaseFile.xml:

time_zone value="AUo
daylight_savings value="AQAAAAAAAAAAAA=="

this is the code in .xml file.

smaynard
Offline
Joined: 2009-01-27
Points: 0

I mistyped it.

The value should be: "AQAAAAAAAAAAAA=="

I also noticed a difference between win32 and Linux on the time_zone variable, it seems that value should be "AUo=" for all instances of base64 decoding to work properly.

swati_V
Offline
Joined: 2012-07-09
Points: 0

any updates on this?

swati_V
Offline
Joined: 2012-07-09
Points: 0

hi,
i tried number of ways to set time zone to +5:30 but no output yet..
i am using windows7 here. does it makes any difference?
please suggest me any other alternative to do this.

smaynard
Offline
Joined: 2009-01-27
Points: 0

This process does not set the time/date/tz on your PC. It is only a simulation/example for how platform code can store the Generic Feature data in XML. The stack should be utilizing the date/time from your PC.