* adfCurrentDateTime * * return the current system date and time */
| 160 | * return the current system date and time |
| 161 | */ |
| 162 | struct DateTime |
| 163 | adfGiveCurrentTime( void ) |
| 164 | { |
| 165 | struct tm *local; |
| 166 | time_t cal; |
| 167 | struct DateTime r; |
| 168 | |
| 169 | time(&cal); |
| 170 | local=localtime(&cal); |
| 171 | |
| 172 | r.year=local->tm_year; /* since 1900 */ |
| 173 | r.mon=local->tm_mon+1; |
| 174 | r.day=local->tm_mday; |
| 175 | r.hour=local->tm_hour; |
| 176 | r.min=local->tm_min; |
| 177 | r.sec=local->tm_sec; |
| 178 | |
| 179 | return(r); |
| 180 | } |
| 181 | |
| 182 | |
| 183 | /* |
no outgoing calls
no test coverage detected