VirtualBox

Changeset 68107 in vbox for trunk


Ignore:
Timestamp:
Jul 25, 2017 2:06:30 PM (7 years ago)
Author:
vboxsync
Message:

iprt: Added some time zone name mapping info (for unattended guest installation).

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/mangling.h

    r67979 r68107  
    22482248# define RTTimeFromString                               RT_MANGLER(RTTimeFromString)
    22492249# define RTTimeToString                                 RT_MANGLER(RTTimeToString)
     2250# define RTTimeZoneGetInfoByUnixName                    RT_MANGLER(RTTimeZoneGetInfoByUnixName)
     2251# define RTTimeZoneGetInfoByWindowsName                 RT_MANGLER(RTTimeZoneGetInfoByWindowsName)
     2252# define RTTimeZoneGetInfoByWindowsIndex                RT_MANGLER(RTTimeZoneGetInfoByWindowsIndex)
    22502253# define RTTlsAlloc                                     RT_MANGLER(RTTlsAlloc)
    22512254# define RTTlsAllocEx                                   RT_MANGLER(RTTlsAllocEx)
  • trunk/include/iprt/time.h

    r64255 r68107  
    10311031RTDECL(uint64_t) RTTimeProgramStartNanoTS(void);
    10321032
     1033
     1034/**
     1035 * Time zone information.
     1036 */
     1037typedef struct RTTIMEZONEINFO
     1038{
     1039    /** Unix time zone name (continent/country[/city]|). */
     1040    const char     *pszUnixName;
     1041    /** Windows time zone name.   */
     1042    const char     *pszWindowsName;
     1043    /** The length of the unix time zone name. */
     1044    uint8_t         cchUnixName;
     1045    /** The length of the windows time zone name. */
     1046    uint8_t         cchWindowsName;
     1047    /** Two letter country/territory code if applicable, otherwise 'ZZ'. */
     1048    char            szCountry[3];
     1049    /** Two letter windows country/territory code if applicable.
     1050     * Empty string if no windows mapping. */
     1051    char            szWindowsCountry[3];
     1052#if 0 /* Add when needed and it's been extracted. */
     1053    /** The standard delta in minutes (add to UTC). */
     1054    int16_t         cMinStdDelta;
     1055    /** The daylight saving time delta in minutes (add to UTC). */
     1056    int16_t         cMinDstDelta;
     1057#endif
     1058    /** closest matching windows time zone index. */
     1059    uint32_t        idxWindows;
     1060    /** Flags, RTTIMEZONEINFO_F_XXX. */
     1061    uint32_t        fFlags;
     1062} RTTIMEZONEINFO;
     1063/** Pointer to time zone info.   */
     1064typedef RTTIMEZONEINFO const *PCRTTIMEZONEINFO;
     1065
     1066/** @name RTTIMEZONEINFO_F_XXX - time zone info flags.
     1067 *  @{ */
     1068/** Indicates golden mapping entry for a windows time zone name. */
     1069#define RTTIMEZONEINFO_F_GOLDEN         RT_BIT_32(0)
    10331070/** @} */
    10341071
     1072/**
     1073 * Looks up static time zone information by unix name.
     1074 *
     1075 * @returns Pointer to info entry if found, NULL if not.
     1076 * @param   pszName     The unix zone name (TZ).
     1077 */
     1078RTDECL(PCRTTIMEZONEINFO) RTTimeZoneGetInfoByUnixName(const char *pszName);
     1079
     1080/**
     1081 * Looks up static time zone information by window name.
     1082 *
     1083 * @returns Pointer to info entry if found, NULL if not.
     1084 * @param   pszName     The windows zone name (reg key).
     1085 */
     1086RTDECL(PCRTTIMEZONEINFO) RTTimeZoneGetInfoByWindowsName(const char *pszName);
     1087
     1088/**
     1089 * Looks up static time zone information by windows index.
     1090 *
     1091 * @returns Pointer to info entry if found, NULL if not.
     1092 * @param   idxZone     The windows timezone index.
     1093 */
     1094RTDECL(PCRTTIMEZONEINFO) RTTimeZoneGetInfoByWindowsIndex(uint32_t idxZone);
     1095
     1096/** @} */
     1097
    10351098RT_C_DECLS_END
    10361099
  • trunk/src/VBox/Runtime/Makefile.kmk

    r67979 r68107  
    609609        common/time/timeprog.cpp \
    610610        common/time/timesup.cpp \
     611        common/time/timezoneinfo.cpp \
    611612        common/vfs/vfsbase.cpp \
    612613        common/vfs/vfschain.cpp \
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette