共用方式為


CFileTime::GetCurrentTime

Call this static function to retrieve a CFileTime object that represents the current system date and time.

static CFileTime GetCurrentTime( ) throw( );

Return Value

Returns the current system date and time in Coordinated Universal Time (UTC) format.

Example

// Retrieve the current time
CFileTime myFT;
myFT = CFileTime::GetCurrentTime();

Requirements

Header: atltime.h

See Also

Reference

CFileTime Class

time, _time32, _time64