CNntpClient::GetCurrentDate Method  
 
INT GetCurrentDate(
  LPTSTR lpszDate,  
  INT nMaxLength  
);
INT GetCurrentDate(
  CString& strDate  
);

The GetCurrentDate method copies the current date and time to the specified buffer in a format that is commonly used in news articles. This date format should be used in all date-related fields in the message header.

Parameters

lpszDate
Pointer to a string buffer that will contain the current date and time when the method returns.
nMaxLength
The maximum number of characters that can be copied into the string buffer.

Return Values

If the method succeeds, the return value is the number of characters copied into the buffer, not including the null-terminator. If the method fails, the return value is NNTP_ERROR. To get extended error information, call GetLastError.

Remarks

The date value that is returned is adjusted for the local timezone.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csnwsv10.lib
Unicode: Implemented as Unicode and ANSI versions.

See Also

CreateArticle