Article View: pl.misc.telefonia.wap
Article #176Re: [NTG] EKG
From: Sergiusz Różański
Date: Fri, 08 Aug 2003 20:09
Date: Fri, 08 Aug 2003 20:09
46 lines
2452 bytes
2452 bytes
In article <lbtz3t476l5e$.bcohp18ge4km$.dlg@40tude.net>, -= detmo =- wrote:
> Przepraszam za NTG, ale może wy mi pomożecie.
> Jak ustawić zmienną log_timestamp, aby format czasu w histori był
> czytelniej prezentowany, a nie jako ilość sekund od 1970.
> Z góry dziękuję za pomoc, szukałem na googlu i w dokumentacji, nie
> znalazłem żadnych szczegółów.
>
zajrzeć do źródeł :)
plik log.c we funkcji:
const char *log_timestamp(time_t t)
jest:
if (config_log_timestamp) {
strftime(buf[i], sizeof(buf[0]), config_log_timestamp, tm);
return buf[i++];
} else
return itoa(t);
więc jak zmiennej nie ustawisz to leci faktycznie w sekundach,
a zmienna config_log_timestamp jeśli jest jest jednocześnie jako
parametr dla strftime więc 'man strftime':
set log_timestamp %H:%M:%S
lub
set log_timestamp %T
%T The time in 24-hour notation (%H:%M:%S). (SU)
%u The day of the week as a decimal, range 1 to 7,
Monday being 1. See also %w. (SU)
a może chcesz numer tygodnia w roku?
%W The week number of the current year as a decimal
number, range 00 to 53, starting with the first
Monday as the first day of week 01.
zresztą jak dasz tego mana na ekran, to zobaczysz ile możesz
zmiennych wrzucić i poustawiać jak chcesz np:
set log_timestamp Roku:%y dnia %d miesiąca %m o godzinie %T przyszło coś takiego:
;)
--
Sergiusz Różański
Pamiętaj, brama przeciwnika jest na dole!
Technical Details
Message-ID:
<slrnbj80qj.i1n.serek@dns.media-lab.com.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<lbtz3t476l5e$.bcohp18ge4km$.dlg@40tude.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Sergiusz Różański <serek@media-lab.USUN.com.pl> Newsgroups: pl.misc.telefonia.wap Subject: Re: [NTG] EKG Date: Fri, 8 Aug 2003 20:09:50 +0000 (UTC) Organization: tp.internet - http://www.tpi.pl/ Lines: 46 Message-ID: <slrnbj80qj.i1n.serek@dns.media-lab.com.pl> References: <lbtz3t476l5e$.bcohp18ge4km$.dlg@40tude.net> NNTP-Posting-Host: pa144.kalisz.sdi.tpnet.pl Mime-Version: 1.0 X-Trace: nemesis.news.tpi.pl 1060373390 12057 213.25.233.144 (8 Aug 2003 20:09:50 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Fri, 8 Aug 2003 20:09:50 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit