diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/digiphot/apphot/aputil/apdate.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/digiphot/apphot/aputil/apdate.x')
-rw-r--r-- | noao/digiphot/apphot/aputil/apdate.x | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/aputil/apdate.x b/noao/digiphot/apphot/aputil/apdate.x new file mode 100644 index 00000000..21faea88 --- /dev/null +++ b/noao/digiphot/apphot/aputil/apdate.x @@ -0,0 +1,29 @@ +include <time.h> + +# APDATE -- Fetch the date and time strings required for the apphot output +# files. + +procedure apdate (date, time, maxch) + +char date[ARB] # the date string +char time[ARB] # the time string +int maxch # the maximum number of character in the string + +int tm[LEN_TMSTRUCT] +long ctime +long clktime() +#long lsttogmt() + +begin + ctime = clktime (long(0)) + #ctime = lsttogmt (ctime) + call brktime (ctime, tm) + call sprintf (date, maxch, "%04d-%02d-%02d") + call pargi (TM_YEAR(tm)) + call pargi (TM_MONTH(tm)) + call pargi (TM_MDAY(tm)) + call sprintf (time, maxch, "%02d:%02d:%02d") + call pargi (TM_HOUR(tm)) + call pargi (TM_MIN(tm)) + call pargi (TM_SEC(tm)) +end |