Community discussions

MikroTik App
 
User avatar
bjohns
Member Candidate
Member Candidate
Topic Author
Posts: 271
Joined: Sat May 29, 2004 4:11 am
Location: Sippy Downs, Australia
Contact:

WISPr-Session-Terminate-Time error

Tue Feb 13, 2007 6:47 am

Receiving an error when passing this attribute to the Hotspot:

Required format: YYYY-MM-DDThh:mm:ssTZD

hotspot,error,info,debug testuser10 (172.16.101.250):
ignoring invalid session terminate time <2009-05-07P11:59:59+10:00> from RADIUS

Manual says that TZD can be in the form of:
+hh:mm", "+hhmm", "-hh:mm", "-hhmm"

Something I'm missing?

RouterOS 2.9.39
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Tue Feb 13, 2007 8:55 am

Why is there a 'P' used between date and time? I suppose there should be a 'T'.
 
User avatar
bjohns
Member Candidate
Member Candidate
Topic Author
Posts: 271
Joined: Sat May 29, 2004 4:11 am
Location: Sippy Downs, Australia
Contact:

Wed Feb 14, 2007 12:15 am

I had considered that but the manual says:

T - either "A" for AM, or "P" for PM;

So I thought "T" was merely a gap filler to be replaced with A or P?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Wed Feb 14, 2007 9:34 am

we will fix the docs, it should be T
 
User avatar
bjohns
Member Candidate
Member Candidate
Topic Author
Posts: 271
Joined: Sat May 29, 2004 4:11 am
Location: Sippy Downs, Australia
Contact:

Wed Feb 14, 2007 10:42 am

So the time should be in 24hr format then?

Thanks.
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26379
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Thu Feb 15, 2007 8:33 am

yes
 
grantwnorman
just joined
Posts: 12
Joined: Mon Nov 19, 2007 7:19 am

Re: WISPr-Session-Terminate-Time error

Thu Jan 10, 2008 11:11 pm

I am also having this problem...

05:42:56 hotspot,error,info,debug minutetest (10.10.10.208): ignoring invalid session terminate time <2008-01-10MST12:46:53-07:00> from RADIUS

I use the correct format as directed and the "T" is replaced with the MST (mountain standard I assume)...is that supposed to happen? Here is the code I use to setup the terminate time...

$_SESSION[expire_time] = strtotime("+5minutes");
$_SESSION[expire_time] = date('Y-m-dTH:i:s-07:00',$_SESSION[expire_time]);

What am I missing here?

Thanks in advance,
Grant
 
grantwnorman
just joined
Posts: 12
Joined: Mon Nov 19, 2007 7:19 am

Re: WISPr-Session-Terminate-Time error

Fri Jan 11, 2008 12:07 am

Ok, well apparently, the date() function was pre-parsing the T and replacing with the timezone.
Assuming the MT box wanted to parse it instead, I went ahead and did a string replace putting the T back in the $_SESSION[expire_time]...

//$_SESSION[expire_time] = substr_replace($_SESSION[expire_time], 'T', 10, -14) ;

That took care of the errors I was finding in the logs, but user is still not disconnected.

Solution:
Checked my system clock on the MT box and it was set incorrectly. tried logging in under expired user and it gave session expired error message as expected.

thought this update might help someone out perhaps

Who is online

Users browsing this forum: GoogleOther [Bot] and 97 guests