Thread: site pretime
View Single Post
Old 06-24-2003, 05:22 PM  
Zalio
Junior Member
 
Join Date: Nov 2002
Posts: 8
Default

wonderful script mounton.. i started editing your c++ file, i wanted to change the table names because it is better when i want to add more functions to it.

but i have one problem.. you are using column timestamp and i use date_time. In the last part of the .cpp file it says this:

Code:
		Result::iterator i;
		int j = 1;
		time_t timestamp;
		struct tm *datetime;
		for (i = res.begin(); i != res.end(); i++) {
			row = *i;
			timestamp = (time_t)row["timestamp"];
			datetime = localtime(&timestamp);
			printf("%02i. %i-%02i-%02i %02i:%02i:%02i -> ",j++,datetime->tm_year+1900,datetime->tm_mon,datetime->tm_mday,datetime->tm_hour,datetime->tm_min,datetime->tm_sec);
			cout << row["name"] << endl;
		}
		cout << "*--[/PRETiME]----------------------------------------------------*\n";
i changed it in this:

Code:
			timestamp = (time_t)row["date_time"];
			datetime = localtime(&timestamp);
is this good or do i also need to change the (&timestamp) in (&date_time) ? :P

very thnx if you can help me

Greetz Zalio
Zalio is offline   Reply With Quote