File: UTdate.html

package info (click to toggle)
libtsp 3r0-1
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 5,096 kB
  • ctags: 1,798
  • sloc: ansic: 14,464; sh: 1,217; makefile: 182
file content (59 lines) | stat: -rw-r--r-- 1,994 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<HTML>
<HEAD>
<TITLE>TSP (libtsp/UT) - UTdate</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>UTdate</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
char *UTdate (int format)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Return a date/time string for the current time
</DL>
<H4>Description</H4>
This routine returns a date/time string in a number of standard formats.
Formats 0, 1 and 2 are in local time.  Format 0 is the standard C-language
format (without the trailing newline character).  Format 1 includes the time
zone abbreviation.  Formats 0 and 1 use English abbreviations for the day of
the week and the month.  Format 2 avoids language dependent names (except for
the time-zone code).  Format 3 gives the date and time in GMT (Universal
Coordinated Time).  All fields are fixed length, except possibly the time
zone abbreviation.  The conversion process produces no more than 29
characters plus the terminating null character.  This length allows for at
least a 4 character representation of the time zone abbreviation.
<P>
<PRE>
 Format  Example                      time zone    length
   0    Sun Sep 16 01:03:52 1973      local time   24 + null
   1    Sun Sep 16 01:03:52 EST 1973  local time   28* + null
   2    1994/01/23 09:59:53 EST       local time   23* + null
   3    1994/01/23 14:59:53 UTC       GMT          23 + null
             (*) the time zone length can vary
</PRE>
<H4>Parameters</H4>
<DL>
<DT>
&lt;-  char *UTdate
<DD>
Pointer to a character string for the date and time.  This string is null
terminated and most 29 characters long, not including the terminating
null character.  This is a pointer to an internal static storage area;
each call to this routine overlays this storage.
<DT>
 -&gt; int format
<DD>
Date / time format code, taking on values from 0 to 3
</DL>
<H4>Author / revision</H4>
P. Kabal  Copyright (C) 1997
/ Revision 1.12  1997/10/14
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>