Welcome to the Builder Academy

Question Ban

More
19 Apr 2019 06:12 - 19 Apr 2019 06:19 #8360 by JTP
Ban was created by JTP
Hmm it seems when i use ban. Then i tried it today the 19th. But as date it just shows 1. See attachment.

Any idea How to solve ?


I also have an entre from back in november it just says: Thu Nov
But No date
Attachments:
Last edit: 19 Apr 2019 06:19 by JTP.

Please Log in or Create an account to join the conversation.

More
19 Apr 2019 11:37 #8361 by thomas
Replied by thomas on topic Ban
Seems this is a case of "wrong" formatting.

Have a look at ban.c - github.com/tbamud/tbamud/blob/14855c273a...f8e53/src/ban.c#L119

Does your code look the same here?

Please Log in or Create an account to join the conversation.

More
19 Apr 2019 11:49 #8362 by JTP
Replied by JTP on topic Ban
I changed mine from 10.10 to 15.15

So now mine also is: #define BAN_LIST_FORMAT "%-25.25s %-8.8s %-15.15s %-16.16s\r\n"

But it did not help

Please Log in or Create an account to join the conversation.

More
22 Apr 2019 04:01 #8363 by JTP
Replied by JTP on topic Ban
Any other ideas what it could be ?

Please Log in or Create an account to join the conversation.

More
23 Apr 2019 20:10 #8364 by thomas
Replied by thomas on topic Ban
Well, all code related to that display is right there. Is the code you have there changed compared to the link I sent you above?

Please Log in or Create an account to join the conversation.

More
27 Apr 2019 11:26 #8366 by JTP
Replied by JTP on topic Ban
Seems that i in do_ban had:
strlcpy(timestr, asctime(localtime(&(ban_node->date))), 10);
timestr[10] = '\0';


When i entered:

strftime(timestr, sizeof(timestr), "%a %b %d %Y", localtime(&(ban_node->date)));

all was fine now including year to

Thanks Thomas

Please Log in or Create an account to join the conversation.

Time to create page: 0.277 seconds