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

master
Aadhavan Srinivasan 2 years ago
parent 868aaccf28
commit c8c9a34aab

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

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

Loading…
Cancel
Save