InternetTimeFromSystemTimeW function (wininet.h)

Formats a date and time according to the HTTP version 1.0 specification.

Syntax

BOOL InternetTimeFromSystemTimeW(
  [in]  const SYSTEMTIME *pst,
  [in]  DWORD            dwRFC,
  [out] LPWSTR           lpszTime,
  [in]  DWORD            cbTime
);

Parameters

[in] pst

Pointer to a SYSTEMTIME structure that contains the date and time to format.

[in] dwRFC

RFC format used. Currently, the only valid format is INTERNET_RFC1123_FORMAT.

[out] lpszTime

Pointer to a string buffer that receives the formatted date and time. The buffer should be of size INTERNET_RFC1123_BUFSIZE.

[in] cbTime

Size of the lpszTime buffer, in bytes.

Return value

Returns TRUE if the function succeeds, or FALSE otherwise. To get extended error information, call GetLastError.

Remarks

Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).
 

Note

The wininet.h header defines InternetTimeFromSystemTime as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wininet.h
Library Wininet.lib
DLL Wininet.dll

See also

Common Functions

WinINet Functions