OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
get_time.c
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------
2  Function: get_time
3 
4  Returns: None
5 
6  Description:
7  The function get_time accesses system current time (GMT) and passes the
8  concatenated string of digits for year, day-of-year, hours, minutes,
9  seconds, and fraction of seconds in the format of YYYYDDDHHMMSSFFF
10  to the calling routine.
11 
12  Arguments: (in calling order)
13  Type Name I/O Description
14  ---- ---- --- -----------
15  char * pr_time O Processing time
16 
17  Notes:
18 
19  Modification history:
20  Programmer Organization Date Description of change
21  -------------- ------------ -------- ---------------------
22  Lakshmi Kumar Hughes STX 07/14/94 Original development
23  ---------------------------------------------------------------------------*/
24 #include <time.h>
25 #include <stdio.h>
26 #include <timeutils.h>
27 
28 void get_time(char *pr_time) {
29  struct tm *tp;
30  time_t ptime;
31 
32  ptime = time(&ptime);
33  tp = gmtime(&ptime);
34 
35  sprintf(pr_time, "%4d%03d%02d%02d%02d%03d",
36  tp->tm_year + 1900,
37  tp->tm_yday + 1,
38  tp->tm_hour,
39  tp->tm_min,
40  tp->tm_sec,
41  0);
42 }
43 
44 
45 
46 
47 
48 
49 
50 
float tm[MODELMAX]
float tp[MODELMAX]
Definition: atrem_corl1.h:173
void get_time(char *pr_time)
Definition: get_time.c:28
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned resolving bug report Corrected to filter out Aqua attitude records with missing status helping resolve bug MOD_PR03 will still correctly write scan and pixel data that does not depend upon the start time
Definition: HISTORY.txt:248