NAME

asn1_time asn1_utc_time asn1_gen_time

SYNOPSIS

#include 
#include 
#include "asn1.h"

asn1_utc_time(z,x)
char * z;
struct timeb *x;

asn1_gen_time(z,x)
char * z;
struct timeb *x;

asn1_time(z,l,x)
char * z;
int l;
struct timeb *x;
asn1_time_gen(z,l,x)
char * z;
int l;
struct timeb *x;

DESCRIPTION

The Universal time format is defined as a character string, made of the year, month, day, hour, minute and optionally secunds. It can be completed by a time differential between the local time and the UTC time, or by the letter Z, to denote the absence of any differential. The generalized time format is an evolution of the UTCtime, completed by an arbitrarily precise decimal fraction of a secund.

The routines in the file utctime.c perform the conversion between the UTC time and Generalized time formats:
861021163112+0400 19910605213044.922+0200
and the timeb structure defined by :
struct timeb {
time_t time; unsigned short millitm; short timezone; short dstflag;
};
This structure is also used by the system call ftime, which is available under most versions of UNIX.

The routine asn1_gen_time will convert an UNIX representation into a generalized time. The routine asn1_time_gen will perform the reverse conversion.

The routine asn1_utc_time will always convert to an UTC time, without fractions of seconds. The routine asn1_time will perform the reverse conversion.

As the UTCtime format stores years on two digits, the routines asn1_utc_time and asn1_time will give unpredictable results for dates after the 31 December 1999. They are also inadequate for dates before the 1 January 1902.

"SEE ALSO"

ftime (3c),
mavcod (9x),
mavros (9x),
mavros-output (9x),
asn1_oid(9x),
asn1_malloc (9x)
C. Huitema, "General Presentation of the MAVROS Compiler" ,INRIA, 1990