Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CTime::GetLocalTm
CTime                                       Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  struct tm* GetLocalTm( struct tm* ptm ) const;
 
  Parameter   Description
 
  <ptm>       Points to a buffer that will receive the time data. If this
              pointer is NULL, an internal, statically allocated buffer is
              used. The data in this default buffer is overwritten as a
              result of calls to other CTime member functions.
 
  Remarks
 
  Gets a struct tm containing a decomposition of the time contained in
  this CTime object. GetLocalTm returns local time.
 
  Return Value
 
  A pointer to a filled-in struct tm as defined in the include file
  TIME.H. See GetGmtTm for the structure layout.
 
  Example
 
  CTime t( 1999, 3, 19, 22, 15, 0 ); // 10:15PM March 19, 1999
  struct tm* osTime;  // a pointer to a structure containing time elements
  osTime = t.GetLocalTm( NULL );
  ASSERT( osTime->tm_mon == 2 ); // note zero-based month!
 
 
 
                                     -♦-