]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MINICERN/packlib/kernlib/kerngen/ccgen/datimh.c
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / MINICERN / packlib / kernlib / kerngen / ccgen / datimh.c
CommitLineData
fe4da5cc 1/*
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.6 1997/12/19 16:36:09 mclareni
6 * After 2000, the date in ID, ND will have the old format with the year as 2 digits
7 *
8 * Revision 1.5 1997/11/05 10:35:32 mclareni
9 * Remove the last WNT mod
10 *
11 * Revision 1.3 1997/09/02 14:26:35 mclareni
12 * WINNT correction
13 *
14 * Revision 1.2 1997/02/04 17:34:15 mclareni
15 * Merge Winnt and 97a versions
16 *
17 * Revision 1.1.1.1.2.1 1997/01/21 11:29:26 mclareni
18 * All mods for Winnt 96a on winnt branch
19 *
20 * Revision 1.1.1.1 1996/02/15 17:49:21 mclareni
21 * Kernlib
22 *
23 */
24#include "kerngen/pilot.h"
25#include "kerngen/fortranc.h"
26
27/*> ROUTINE DATIMH
28 CERN PROGLIB# Z007 DATIMH .VERSION KERNFOR 4.40 940929
29*/
30#if !defined(CERNLIB_QMOS9)
31#include <sys/types.h>
32#endif
33#include <time.h>
34
35#if defined(CERNLIB_QX_SC)
36void type_of_call datimh_(dh, th)
37#endif
38#if defined(CERNLIB_QXNO_SC)
39void type_of_call datimh(dh, th)
40#endif
41#if defined(CERNLIB_QXCAPT)
42void type_of_call DATIMH(dh, th)
43#endif
44 char dh[7], th[7];
45{
46 struct tm *tp;
47
48 time_t tloc = time(0);
49 tp = localtime(&tloc);
50 dh[0] = tp->tm_mday / 10 + '0';
51 dh[1] = tp->tm_mday % 10 + '0';
52 dh[2] = '/';
53 dh[3] = (tp->tm_mon + 1) / 10 + '0';
54 dh[4] = (tp->tm_mon + 1) % 10 + '0';
55 dh[5] = '/';
56 dh[6] = (tp->tm_year % 100) / 10 + '0';
57 dh[7] = (tp->tm_year % 100) % 10 + '0';
58 th[0] = tp->tm_hour / 10 + '0';
59 th[1] = tp->tm_hour % 10 + '0';
60 th[2] = '.';
61 th[3] = tp->tm_min / 10 + '0';
62 th[4] = tp->tm_min % 10 + '0';
63 th[5] = '.';
64 th[6] = tp->tm_sec / 10 + '0';
65 th[7] = tp->tm_sec % 10 + '0';
66 return;
67}
68/*> END <----------------------------------------------------------*/
69#ifdef CERNLIB_TCGEN_DATIMH
70#undef CERNLIB_TCGEN_DATIMH
71#endif