Used 'tm*' instead of 'tm' for storing time

This commit is contained in:
2023-04-14 08:10:52 -05:00
parent 868aaccf28
commit c8c9a34aab
2 changed files with 3 additions and 3 deletions

View File

@@ -22,10 +22,10 @@ Message* new_message(char* string, User* from, User* to) {
// *(new_message->recipient) = *to;
time_t rawtime;
struct tm timeinfo;
struct tm* timeinfo;
time(&rawtime);
timeinfo = *localtime(&rawtime);
timeinfo = localtime(&rawtime);
new_message->timeinfo = timeinfo;

View File

@@ -10,7 +10,7 @@ typedef struct Message_s Message;
struct Message_s {
char* text;
struct tm timeinfo;
struct tm* timeinfo;
User* sender;
User* recipient;
};