diff options
Diffstat (limited to 'include/iprt/time.h')
-rw-r--r-- | include/iprt/time.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/include/iprt/time.h b/include/iprt/time.h index 7a94dcd7..2981d9de 100644 --- a/include/iprt/time.h +++ b/include/iprt/time.h @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2006-2007 Oracle Corporation + * Copyright (C) 2006-2012 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -524,6 +524,19 @@ DECLINLINE(bool) RTTimeSpecIsEqual(PCRTTIMESPEC pTime1, PCRTTIMESPEC pTime2) */ RTDECL(char *) RTTimeSpecToString(PCRTTIMESPEC pTime, char *psz, size_t cb); +/** + * Attempts to convert an ISO date string to a time structure. + * + * We're a little forgiving with zero padding, unspecified parts, and leading + * and trailing spaces. + * + * @retval pTime on success, + * @retval NULL on failure. + * @param pTime The time spec. + * @param pszString The ISO date string to convert. + */ +RTDECL(PRTTIMESPEC) RTTimeSpecFromString(PRTTIMESPEC pTime, const char *pszString); + /** @} */ @@ -709,6 +722,19 @@ RTDECL(PRTTIME) RTTimeLocalNormalize(PRTTIME pTime); RTDECL(char *) RTTimeToString(PCRTTIME pTime, char *psz, size_t cb); /** + * Attempts to convert an ISO date string to a time structure. + * + * We're a little forgiving with zero padding, unspecified parts, and leading + * and trailing spaces. + * + * @retval pTime on success, + * @retval NULL on failure. + * @param pTime Where to store the time on success. + * @param pszString The ISO date string to convert. + */ +RTDECL(PRTTIME) RTTimeFromString(PRTTIME pTime, const char *pszString); + +/** * Checks if a year is a leap year or not. * * @returns true if it's a leap year. |