Hi Folks;

Can someone help-me how to insert the following to mysql ??, I do not want
to insert " h323-xxxx-time" only the date.

   h323-connect-time = "h323-connect-time=01:14:40.329 GMT Sat Jun 12 2004"
   h323-disconnect-time = "h323-disconnect-time=01:14:40.329 GMT Sat Jun 12
2004"

Thanks
Fabio


----- Original Message ----- 
From: "ROY" <[EMAIL PROTECTED]>
To: "freeradius-users" <[EMAIL PROTECTED]>
Sent: Friday, March 12, 2004 5:14 PM
Subject: Re: Freeradius for Voip


> are you using a cisco box?
>
> if you are.. then.. cisco usually sends date/time in the ff format:
>
> 04:07:39.631 HKG Sat Mar 13 2004
>
> Note that NAS text timezone is set at HKG (which is +0800)..
> unfortunately.. Postgresql doesn't support the 'HKG' as a standard text
> timezone.. hence.. had to change it to a recognized +0800 which is CCT.
>
> See the link below..
> http://developer.postgresql.org/docs/postgres/datetime-keywords.html
>
>
> hence.. the function
>
> CREATE OR REPLACE FUNCTION mychg_tz (VARCHAR) RETURNS TEXT AS '
>  DECLARE
>         date_tz  ALIAS FOR $1;
>  BEGIN
>         return translate(date_tz,''HKG'',''CCT'');
>  END;
> ' LANGUAGE 'plpgsql';
>
>
>
> On Fri, 2004-03-12 at 17:30, Costin Manda wrote:
> > ----- Original Message ----- 
> > From: "ROY" <[EMAIL PROTECTED]>
> > To: "freeradius-users" <[EMAIL PROTECTED]>
> > Sent: Friday, March 12, 2004 4:52 AM
> > Subject: Re: Freeradius for Voip
> >
> >
> > > I think I've ran into this too..
> > > The problem was with text timezone not being recognized by Postgres.
> > >
> > > Here's what I've done:
> >
> > > NAS_TZ = NAS timezone text (not recognized by Postgres)
> > > SQL_TZ = equivalent timezone text recognized by Postgres
> >
> >   Can you give me an example? how would NAS_TZ and SQL_TZ look like?
> >
> > > strip_dot(mychg_tz('%{h323-disconnect-time}'))
> >
> >   I get the same errors, even if I used "<NAS_TZ>" in the function as I
> > didn't know what you meant :)
> >
> >   BTW, I have looked into the SQL trace, all the calls to the strip_dot
> > functions look like strip_dot(''). There is nothing between the
parantesae.
> >
> >
> > -
> > List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
> >
>
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>
>



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to