WRT to the archive, read docs/FAQ - it's available both through google and
at gmane.
WRT UTC, you need to fix up your settings. ntop uses the standard library
functions such as gettimeofday() time(), etc. these are converted to
localtime through (guess...) localtime() and localtime_r() (also
strftime()).
These are all standard C functions, which are sensitive (in varying degrees)
to the settings of timezone and locale.
So, if you setup your userid properly, it should automatically do the
conversions. I know that on many OSes the actual clock time setting (local
vs. UTC) and the resulting timezone settings are handled during
installation - you'll need to look at your OS docs for that.
Try playing with the test program below (gcc -g -o timetest timetest.c)
-----Burton
/**
* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <stdio.h>
#include <time.h>
int main(int argc, char *argv[]) {
/* Lightly modified, from ntop's util.c,
* Returns the difference between gmt and local time in seconds.
* Use gmtime() and localtime() to keep things simple.
* [Borrowed from tcpdump]
*/
time_t t;
int dt, dir;
struct tm *gmt, *myloc;
struct tm loc;
t = time(NULL);
gmt = gmtime(&t);
myloc = localtime_r(&t, &loc);
dt = (myloc->tm_hour - gmt->tm_hour)*60*60+(myloc->tm_min -
gmt->tm_min)*60;
/*
* If the year or julian day is different, we span 00:00 GMT
* and must add or subtract a day. Check the year first to
* avoid problems when the julian day wraps.
*/
dir = myloc->tm_year - gmt->tm_year;
if(dir == 0)
dir = myloc->tm_yday - gmt->tm_yday;
dt += dir * 24 * 60 * 60;
printf("Difference between GMT and LOCAL is %d seconds (%g hours)\n\n",
dt, (float)dt / 3600.0);
}
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
> Miles Stevenson
> Sent: Wednesday, June 23, 2004 10:40 AM
> To: [EMAIL PROTECTED]
> Subject: [Ntop] UTC Time
>
>
> My system time uses UTC. Is there anyway to get ntop to convert
> the UTC times
> into EST? All my timestamps are off because ntop thinks my system
> clock is
> giving the literal time.
>
> BTW: I wasn't able to find this list archived anywhere, so I
> wasn't able to do
> much searching (outside of google) for answers before I posted.
> Does anyone
> know of a searchable archive for this list? The mailman installation at
> ntop.org doesn't seem to have archive activated...
>
> Thanks!
>
> --
> Miles Stevenson
> [EMAIL PROTECTED]
> PGP FP: 035F 7D40 44A9 28FA 7453 BDF4 329F 889D 767D 2F63
> _______________________________________________
> Ntop mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop