Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

void PTime::ReadFrom ( istream &  strm  )  [virtual]

Input the time from the specified stream. If a parse error occurs the time is set to the current time. The string may be in many different formats, for example: "5/03/1999 12:34:56" "15/06/1999 12:34:56" "15/06/01 12:34:56 PST" "5/06/02 12:34:56" "5/23/1999 12:34am" "5/23/00 12:34am" "1999/23/04 12:34:56" "Mar 3, 1999 12:34pm" "3 Jul 2004 12:34pm" "12:34:56 5 December 1999" "10 minutes ago" "2 weeks"

Parameters:
strm  Stream to input the time from.

Reimplemented from PObject.

Definition at line 737 of file ptime.cxx.

References GetTimeZone().

Referenced by PTime().

{
  time_t now;
  struct tm timeBuf;
  time(&now);
  microseconds = 0;
  strm >> ws;
  theTime = PTimeParse(&strm, os_localtime(&now, &timeBuf), GetTimeZone());
}


Generated by  Doxygen 1.6.0   Back to index