TQString EvaChatView::wrapNickName(TQString &nick, TQDateTime time, TQColor color, bool isNormal) { TQString htmlName = nick; EvaHtmlParser parser; parser.setAbsImagePath(EvaMain::images->getSmileyPath()); parser.convertToHtml(htmlName, false, true); TQString msg = "<span style=\"font-size: 9pt; color: " + color.name() +"\">" + htmlName + " "; if(!isNormal) msg+=i18n("(Auto-Reply)"); TQDateTime current = TQDateTime::currentDateTime(); TQString dateFormat = "hh:mm:ss"; if(current.date() != time.date()) dateFormat = "yyyy-MM-dd hh:mm:ss"; msg+=" "+time.toString(dateFormat) + "</span><br>"; return msg; }
void ZoneClock::updateTime() { char *initial_TZ = getenv("TZ"); setenv("TZ", _zone.latin1(), 1); tzset(); time_t t = time(NULL); TQDateTime dt; dt.setTime_t(t); _timeLabel->setText(TQString("%1, %2").arg(TDEGlobal::locale()->formatTime(dt.time(), true)).arg(TDEGlobal::locale()->formatDate(dt.date(), true))); if (initial_TZ != 0) setenv("TZ", initial_TZ, 1); else unsetenv("TZ"); tzset(); }