Time format help
#1

Hello, i have log system but i have problem.

When is time: 19:36:04 , log save 19:46:4

i want make when is 19:36:04 to save 19:36:04.

Here is for connection log.


Код:
format(logpc,sizeof logpc,"[%d/%d/%d]-[%d:%d:%d] | CONNECT | IGRAC: %s | ID: %d | IP: %s |", dan, mjesec, godina, sat, minut, sekund, GetName(playerid), playerid, getip);
Reply
#2

PHP код:
new yearmonthday;
getdate(yearmonthday);
new 
hourminutesecond;
gettime(hourminutesecond); 
Reply
#3

It's very simple. Apply 02%d for examle:
Quote:

format(logpc,sizeof logpc,"[%d/02%d/02%d]-[02%d:02%d:02%d] | CONNECT | IGRAC: %s | ID: %d | IP: %s |", dan, mjesec, godina, sat, minut, sekund, GetName(playerid), playerid, getip);

Reply
#4

Код HTML:
format(logpc,sizeof logpc,"[%d/%d/%d]-[%02d:%02d:%02d] | CONNECT | IGRAC: %s | ID: %d | IP: %s |", dan, mjesec, godina, sat, minut, sekund, GetName(playerid), playerid, getip);
Your welcome.
Reply
#5

Thanks all rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)