Subject: times in SDP part

From: Taji Rachid <[email-masked]>
Date: Thu, 16 Dec 1999 10:14:33 +0100

Hi all,

I have a question about SDP time fields "t=<start time>  <stop time>".

The time field in SDP indicates  the start and stop times for a conference
session. 
The two subfields start time and stop time are the decimal representation of
Network Time Protocol (NTP) time values in seconds.

My question is how to get this decimal representation of NTP values in
seconds from a GMT representation.

For example, in the case of this GMT date:

thu, 16 Dec 1999  16:00:00 GMT 

What is  the decimal representation of NTP values in seconds ?

the following text is From RFC 2327, SDP Session Description Protocol:
 Times, Repeat Times and Time Zones

   t=<start time>  <stop time>

   o "t=" fields specify the start and stop times for a conference
     session.  Multiple "t=" fields may be used if a session is active
     at multiple irregularly spaced times; each additional "t=" field
     specifies an additional period of time for which the session will
     be active.  If the session is active at regular times, an "r="
     field (see below) should be used in addition to and following a
     "t=" field - in which case the "t=" field specifies the start and
     stop times of the repeat sequence.

   o The first and second sub-fields give the start and stop times for
     the conference respectively.  These values are the decimal
     representation of Network Time Protocol (NTP) time values in
     seconds [1].  To convert these values to UNIX time, subtract
     decimal 2208988800.
>>>>>end RFC

Thanks

Rachid

---

From: "Adam B. Roach" <[email-masked]>
Date: Thu, 16 Dec 1999 14:05:39 -0600 (CST)

>What is  the decimal representation of NTP values in seconds ?

December 16, 1999 at 16:00:00 GMT is 945381600 seconds past
midnight, Jan 1 1970 GMT.  Per the description below, you add 2208988800
to this number, yeilding an NTP of 3154370400.

If your system is POSIX (and even NT has a POSIX library now),
you can use the the system call mktime to calculate the number
of seconds since midnight, Jan 1, GMT.

-- 
Adam Roach, Ericsson Inc. |  Ph: +1 972 583 7594 | 1010 E. Arapaho, MS L-04
[email-masked]   | Fax: +1 972 669 0154 | Richardson, TX 75081 USA