diff options
| -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 |
