diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index aecf77fb0..f2d7e8be2 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -87,8 +87,10 @@ CComponentsFrmClock::~CComponentsFrmClock() void CComponentsFrmClock::initTimeString() { - time_t tm = time(0); - strftime((char*) &cl_timestr, sizeof(cl_timestr), cl_format_str, localtime(&tm)); + struct tm t; + time_t ltime; + ltime=time(<ime); + strftime((char*) &cl_timestr, sizeof(cl_timestr), cl_format_str, localtime_r(<ime, &t)); } // How does it works?