~ubuntu-branches/ubuntu/maverick/openssl/maverick

« back to all changes in this revision

Viewing changes to crypto/o_time.c

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Martin
  • Date: 2004-12-16 18:41:29 UTC
  • mto: (11.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041216184129-z7xjkul57mh1jiha
Tags: upstream-0.9.7e
ImportĀ upstreamĀ versionĀ 0.9.7e

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
                        return NULL;
115
115
                logvalue[reslen] = '\0';
116
116
 
 
117
                t = *timer;
 
118
 
 
119
/* The following is extracted from the DEC C header time.h */
 
120
/*
 
121
**  Beginning in OpenVMS Version 7.0 mktime, time, ctime, strftime
 
122
**  have two implementations.  One implementation is provided
 
123
**  for compatibility and deals with time in terms of local time,
 
124
**  the other __utc_* deals with time in terms of UTC.
 
125
*/
 
126
/* We use the same conditions as in said time.h to check if we should
 
127
   assume that t contains local time (and should therefore be adjusted)
 
128
   or UTC (and should therefore be left untouched). */
 
129
#if __CRTL_VER < 70000000 || defined _VMS_V6_SOURCE
117
130
                /* Get the numerical value of the equivalence string */
118
131
                status = atoi(logvalue);
119
132
 
120
133
                /* and use it to move time to GMT */
121
 
                t = *timer - status;
 
134
                t -= status;
 
135
#endif
122
136
 
123
137
                /* then convert the result to the time structure */
124
 
#ifndef OPENSSL_THREADS
125
 
                ts=(struct tm *)localtime(&t);
126
 
#else
 
138
 
127
139
                /* Since there was no gmtime_r() to do this stuff for us,
128
140
                   we have to do it the hard way. */
129
141
                {
198
210
                result->tm_isdst = 0; /* There's no way to know... */
199
211
 
200
212
                ts = result;
201
 
#endif
202
213
                }
203
214
                }
204
215
#endif