Changeset 1533 for trunk/psLib/src/astronomy/psTime.c
- Timestamp:
- Aug 13, 2004, 1:47:10 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psTime.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psTime.c
r1407 r1533 13 13 * @author Ross Harman, MHPCC 14 14 * 15 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-08- 07 00:06:06$15 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-08-13 23:47:10 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 221 221 char *tempString = NULL; 222 222 struct tm *tmTime = NULL; 223 time_t sec; 223 224 224 225 CHECK_NEGATIVE_TIME_STRUCT(time, NULL); … … 230 231 ms = time.tv_usec / 1000; 231 232 233 sec = time.tv_sec; 232 234 // tmTime variable is statically allocated, no need to free 233 tmTime = gmtime(& time.tv_sec);235 tmTime = gmtime(&sec); 234 236 if (!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y/%m/%d,%H:%M:%S", tmTime)) { 235 237 psError(__func__, " : Line %d - Failed strftime conversion", __LINE__); … … 309 311 { 310 312 struct tm *tmTime = NULL; 313 time_t sec; 311 314 312 315 CHECK_NEGATIVE_TIME_STRUCT(time, tmTime); 313 tmTime = gmtime(&time.tv_sec); 316 sec = time.tv_sec; 317 tmTime = gmtime(&sec); 314 318 315 319 return tmTime;
Note:
See TracChangeset
for help on using the changeset viewer.
