LogFile.cpp   LogFile.cpp 
skipping to change at line 26 skipping to change at line 26
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#include "LogFile.hpp" #include "LogFile.hpp"
#include <QTextStream> #include <QTextStream>
QTextStream &operator<<(QTextStream &o, const Now &now) QTextStream &operator<<(QTextStream &o, const Now &now)
{ {
long long int x = now.time; qlonglong x = now.time;
const int micros = x % 1000000; x /= 1000000; const int micros = x % 1000000; x /= 1000000;
const int secs = x % 60; x /= 60; const int secs = x % 60; x /= 60;
const int mins = x % 60; x /= 60; const int mins = x % 60; x /= 60;
const int hours = x % 24; x /= 24; const int hours = x % 24; x /= 24;
o << x o << qSetPadChar('0')
<< ',' << qSetFieldWidth(2) << qSetPadChar('0') << hours << x << ", " //Days since the Unix epoch (1970-01-01)
<< ':' << qSetFieldWidth(2) << qSetPadChar('0') << mins //ISO 8601 UTC time with decimal seconds:
<< ':' << qSetFieldWidth(2) << qSetPadChar('0') << secs << qSetFieldWidth(2) << hours << qSetFieldWidth(0) << ':'
<< '.' << qSetFieldWidth(6) << qSetPadChar('0') << micros << qSetFieldWidth(2) << mins << qSetFieldWidth(0) << ':'
<< qSetFieldWidth(0) << qSetPadChar(' ') << ": "; << qSetFieldWidth(2) << secs << qSetFieldWidth(0) << '.'
<< qSetFieldWidth(6) << micros << qSetFieldWidth(0)
<< qSetPadChar(' ') << "Z: ";//'Z' is for UTC
return o; return o;
} }
QTextStream * log_file = NULL; QTextStream * log_file = NULL;
 End of changes. 2 change blocks. 
7 lines changed or deleted 9 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/