[opendtv] Re: A full explanation of the PSIP time issue.

  • From: "Paul Freeman" <paul@xxxxxxxxxxxxx>
  • To: <opendtv@xxxxxxxxxxxxx>
  • Date: Thu, 24 May 2007 16:54:16 -0500

If anyone has Mark Eyer's PSIP book "PSIP: Program and System Information
Protocol", they can see an example of how time in the STT is represented on
page 150 at the bottom of the page. The following few lines of text are from
Mark's example:

 

    Current time of day (UTC): 1:00 P.M., December 30, 2001;

    .

    The System Time Table indicates the following parameters for the current
time of day:

    GPS seconds = 693,752,413, or 0x2959D25D

    GPS to UTC offset (count of leap seconds) = 13.

 

Now, you can go to the following web site to find a "days between dates"
calculator:
http://www.convertit.com/Go/ConvertIt/Calculators/Date_and_Time/Date_Time_Di
ff_Calc.ASP

 

When I plug in the number of days between January 6, 1980 and December 30,
2001, I get "8029 days".

 

So there are 8029 x 24 = 192696 hours between midnight January 6, 1980 UTC
and midnight December 30, 2001 UTC. Add 13 hours to get to the current time
of 1:00 PM on December 30, 2001 and we have 192709 hours. Converting to
seconds gives 192709 x 60 x 60 = 693,752,400 seconds. Thus, this would be
the number of seconds between 00:00:00 January 6, 1980 UTC and 13:00:00
December 30, 2001 UTC if we never had to worry about leap seconds. However,
the value in Mark's example STT is 13 seconds ahead of this time. This means
that, at the time of the example, we have had 13 leap seconds, and the
GPS_to_UTC offset of 13 should be subtracted from the system_time field in
the STT to convert the system_time from GPS seconds to UTC.

Other related posts: