Changeset 22710
- Timestamp:
- Feb 27, 2009, 1:09:31 PM (17 years ago)
- Location:
- trunk/psLib/src/astro
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psTime.c
r22705 r22710 61 61 static char *timeConfig = NULL; // Time config file path 62 62 static psMetadata *timeMetadata = NULL; // Time metadata read from config file 63 static int isoDecimals = 6; // Number of decimals to use in a string by psTimeToISO 63 64 64 65 … … 1353 1354 } 1354 1355 1356 1357 int psTimeSetISODecimals(int num) 1358 { 1359 int temp = isoDecimals; // Current value, to return 1360 isoDecimals = num; 1361 return temp; 1362 } 1363 1364 int psTimeGetISODecimals(void) 1365 { 1366 return isoDecimals; 1367 } 1368 1355 1369 psString psTimeToISO(const psTime *time) 1356 1370 { 1357 return timeToString(time, 9); // Use all 9 decimals allowed by the nanoseconds1371 return timeToString(time, isoDecimals); 1358 1372 } 1359 1373 -
trunk/psLib/src/astro/psTime.h
r22682 r22710 241 241 /** Convert psTime to ISO8601 formatted string. 242 242 * 243 * Converts psTime to a null terminated string in the form of YYYY-MM-DDThh:mm:ss.ssssss sss.243 * Converts psTime to a null terminated string in the form of YYYY-MM-DDThh:mm:ss.ssssss 244 244 * This function does not add or subtract leapseconds. 245 245 * … … 249 249 const psTime* time ///< Input time to be converted. 250 250 ); 251 252 /** Set number of decimals printed by psTimeToISO 253 * 254 * @return int: Previous setting 255 */ 256 int psTimeSetISODecimals( 257 int num ///< Number of decimals to print 258 ); 259 260 /** Get number of decimals printed by psTimeToISO 261 * 262 * @return int: Current setting 263 */ 264 int psTimeGetISODecimals(void); 251 265 252 266 /** Convert psTime to ISO8601 formatted string with limited decimal places
Note:
See TracChangeset
for help on using the changeset viewer.
