diff options
| author | 0scar <qgt268@alumni.ku.dk> | 2025-02-11 09:42:43 +0000 |
|---|---|---|
| committer | 0scar <qgt268@alumni.ku.dk> | 2025-02-11 09:42:43 +0000 |
| commit | a432f46922b7f0de1404484aee4f861c5bee6dae (patch) | |
| tree | 60664ae59ea041a7bba9c8825d9a8f542cd5d23e | |
| parent | e152ee5f0c5a47e17a6ce06de9e928eedae17152 (diff) | |
Fix weird code in date
| -rw-r--r-- | status.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -97,10 +97,9 @@ struct interface_status interfaces[8]; void date(char* buf) { time_t now = time(NULL); - struct tm tm; - tm = *localtime(&now); + struct tm *tm = localtime(&now); - strftime(buf, ELEMENT_STRBUF_SZ, "%Y-%m-%d %H:%M", &tm); + strftime(buf, ELEMENT_STRBUF_SZ, "%Y-%m-%d %H:%M", tm); } struct battery_status |
