(RADIATOR) UTC Timestamp in SQL String Format...

Rickard Ekeroth rickard at spidernet.net
Tue Mar 8 02:51:13 CST 2005


Thank you all!

I will have a look at the solution that Mike and Roy proposes.

But perhaps it would be a good idea to supply some replacement characters
for formatted sql date time timestamp in UTC aswell. After all it is easier
to convert UTC to local time than the other way around due to daylight
saving time changes in localtime.

Have a nice day!

-----Original Message-----
From: owner-radiator at open.com.au [mailto:owner-radiator at open.com.au]On
Behalf Of Mike McCauley
Sent: 08 March 2005 00:41
To: Hugh Irvine
Cc: rickard at spidernet.net; radiator at open.com.au
Subject: Re: (RADIATOR) UTC Timestamp in SQL String Format...


Hello Hugh,


On Tuesday 08 March 2005 02:26, Hugh Irvine wrote:
> Hi Mikey -
>
> For some reason I thought the Timestamp was in UTC, but it isn't is it?

Yes, the integer in Timestamp is the UTC timestamp.

The local timezone interpretation comes in when localtime is used during the
replacement of the special chars.

I think Richard should use SQL functions to convert the raw integer into the
date format he needs.

Cheers.

>
> How can Richard do what he wants to do?
>
> cheers
>
> Hugh
>
> On 7 Mar 2005, at 14:31, Rickard Ekeroth wrote:
> > Thanks Hugh!
> >
> > However all the formattings (including %F) yield localtime and not
> > UTC. This
> > is my problem...
> >
> > -----Original Message-----
> > From: owner-radiator at open.com.au [mailto:owner-radiator at open.com.au]On
> > Behalf Of Hugh Irvine
> > Sent: 07 March 2005 14:37
> > To: rickard at spidernet.net
> > Cc: radiator at open.com.au
> > Subject: Re: (RADIATOR) UTC Timestamp in SQL String Format...
> >
> >
> >
> > Hello Richard -
> >
> > The Timestamp attribute that is added to radius accounting requests is
> > in UTC (it is the UNIX time in number of seconds contained in a 32 bit
> > integer).
> >
> > There are a number of ways of formatting the Timestamp - for what you
> > want to do see %F in section 6.2 of the Radiator 3.11 reference manual
> > ("doc/ref.html").
> >
> > regards
> >
> > Hugh
> >
> > On 7 Mar 2005, at 13:09, Rickard Ekeroth wrote:
> >> Hello!
> >>
> >> Is there a way to obtain the current timestamp of a packet in
> >> 'extended SQL
> >> date time format' but in UTC rather than localtime? The localtime
> >> causes me
> >> some headache due to daylight saving time. Also I would really like to
> >> store
> >> my timestamp in the database as a 'date time' rather than storing a
> >> naked
> >> second count.
> >>
> >> However if I have to use the second count, I wonder: How many bits are
> >> used
> >> for the 'seconds after 1 jan 1970'-timestamp? Is it a 32 or 64 bit
> >> integer?
> >>
> >> Thank you for your attention and have a nice day!
> >>
> >> Regards,
> >>
> >> Rickard Ekeroth @ SpiderNet
> >> Software Developer / Analyst
> >> rickard at spidernet.net
> >> +35722844870
> >>
> >> --
> >> Archive at http://www.open.com.au/archives/radiator/
> >> Announcements on radiator-announce at open.com.au
> >> To unsubscribe, email 'majordomo at open.com.au' with
> >> 'unsubscribe radiator' in the body of the message.
> >
> > NB: I am travelling this week, so there may be delays in our
> > correspondence.
> >
> > --
> > Radiator: the most portable, flexible and configurable RADIUS server
> > anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
> > -
> > Nets: internetwork inventory and management - graphical, extensible,
> > flexible with hardware, software, platform and database independence.
> > -
> > CATool: Private Certificate Authority for Unix and Unix-like systems.
> >
> > --
> > Archive at http://www.open.com.au/archives/radiator/
> > Announcements on radiator-announce at open.com.au
> > To unsubscribe, email 'majordomo at open.com.au' with
> > 'unsubscribe radiator' in the body of the message.
>
> NB: I am travelling this week, so there may be delays in our
> correspondence.

--
Mike McCauley                               mikem at open.com.au
Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
9 Bulbul Place Currumbin Waters QLD 4223 Australia   http://www.open.com.au
Phone +61 7 5598-7474                       Fax   +61 7 5598-7070

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP etc on Unix, Windows, MacOS etc.

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list