From d0854e1e76e00824117d687857b5efec3b9934ea Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 28 Oct 1999 10:18:34 +0000 Subject: [PATCH] fix clock..... SVN revision: 1016 --- epplets/E-Clock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epplets/E-Clock.c b/epplets/E-Clock.c index 8cf6048..1d6551b 100644 --- a/epplets/E-Clock.c +++ b/epplets/E-Clock.c @@ -14,7 +14,6 @@ static void cb_help(void *data); static void cb_timer(void *data) { - char tm[64]; struct tm tim; struct tm *tim2; time_t t2; @@ -25,8 +24,9 @@ cb_timer(void *data) if (tim2) { memcpy(&tim, tim2, sizeof(struct tm)); - strftime(tm, 63, "%l %M %S", &tim); - sscanf(tm, "%i %i %i", &h, &m, &s); + h = tim.tm_hour; + m = tim.tm_min; + s = tim.tm_sec; hours = (double)h + ((double)m / 60) + ((double)s / 3600); minutes = (double)m + ((double)s / 60); seconds = (double)s;