Skip to content

Commit

Permalink
Added year to news update date
Browse files Browse the repository at this point in the history
  • Loading branch information
origintempus committed Sep 9, 2017
1 parent 2412bbc commit 974dc22
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/dyntext/dyntext.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,21 +457,21 @@ dynedit_check_dyntext(struct creature *ch,
static char *
dynedit_update_string(dynamic_text_file * d)
{

struct tm tmTime;
time_t t;
char time_buf[30];
time_t ct;
static char buffer[1024];

if (!strncmp(d->filename, "fate", 4)
|| !strncmp(d->filename, "arenalist", 9))
return tmp_strdup("");
printf("Updating File: %s\r\n", d->filename);
t = time(NULL);
tmTime = *(localtime(&t));

ct = time(NULL);
strftime(time_buf, 30, "%m/%d/%Y", localtime(&ct));

snprintf(buffer, sizeof(buffer),
"\r\n-- %s UPDATE (%d/%d) -----------------------------------------\r\n\r\n",
tmp_toupper(d->filename), tmTime.tm_mon + 1, tmTime.tm_mday);
"\r\n-- %s UPDATE (%s) -----------------------------------------\r\n\r\n",
tmp_toupper(d->filename), time_buf);

return buffer;

Expand Down

0 comments on commit 974dc22

Please sign in to comment.