Thanks Nikos, Of course I can handle it in PlaySMS (in the geturl.php script that process the incoming MO from smsbox). I just post to kannel users in case it was a bad behavior that can be improved, but if it was coded like that to manage such HTTP calls that can not know the timezone, Ok I understand. After that give the chance to others people to configure this option between local-time and GMT time is not stupid, at least adding this information in the documentation may help.
Let me know your thought about this, for my case I can handle this on my side or I just have to replace gw_gmtime by gw_localtime in gw/urltrans.c and compile ? My sms-service config: *# PlaysSMS SERVICE Default group = sms-service keyword = default get-url = " http://192.168.0.41/playsms/plugin/gateway/kannel/geturl.php?t=%t&q=%q&a=%a" omit-empty = true* Regards, Emmanuel 2010/6/23 Nikos Balkanas <nbalka...@gmail.com> > Absolutely, yes, it is generated by smsbox. Could you please post your > sms-service configuration? > Sorry for taking too much time asking about log times, but just now I > realized what your problem is. I have never checked sms-service, since I've > only dealt with MT traffic. > > There are no configuration options realting to GMT or localtime, either for > smsbox or sms-service. It is code related. But I am sure you already know > this. > > I found the problem. It is gw/urltrans.c, it calls gw_gmtime instead of > gw_localtime. I guess this is done on purpose. Since these are remote http > calls and you don't know the timezone beforehand, it is safer to send GMT > and let receiving application handle it. I could provide a patch that > introduces a configurable option in sms-service, but I have to know. Can't > you handle it in playSMS? That would be preferrable to introducing a zillion > parameters in sms-service. > > > BR, > Nikos > > ----- Original Message ----- From: Emmanuel CHANSON > To: Nikos Balkanas > Cc: users > Sent: Wednesday, June 23, 2010 8:32 AM > > Subject: Re: Smsbox & SMS Services -Incoming SMS datetime problem > > > I found the bearerbox and smsc log corresponding to the test from the post > and yes Nikos they are in local time not GMT > > The thing is I have installed Kannel using Alex's patch that create RPM > maybe I have to check on this side... > But Nikos do you have a good datetime in smsbox.log when you compare > timestamp at the beginning of the line and the timestamp inside the parse > URL (ts): > > 2010-06-22 15:19:26 [4807] [9] DEBUG: Parsing URL ` > http://192.168.0.41/playsms/plugin/gateway/kannel/geturl.php?t=2010-06-22+04:19:21&q=% > 2B687xxxxxx&a=Kcn+info': > > Because here we can see the problem : t=2010-06-22+04:19:21, this URL it is > generated by smsbox ? > > > > bearerbox.log > 2010-06-22 15:19:26 [4760] [17] DEBUG: send_msg: sending msg to box: > <127.0.0.1> > 2010-06-22 15:19:26 [4760] [17] DEBUG: boxc_sender: sent message to > <127.0.0.1> > 2010-06-22 15:19:26 [4760] [16] DEBUG: boxc_receiver: got ack > 2010-06-22 15:19:26 [4760] [16] DEBUG: boxc_receiver: sms received > > smsc.log > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: <-- +CPMS: > 1,60,1,60,1,60 > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: <-- OK > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: --> AT+CMGR=0^M > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: <-- +CMGR: 0,,25 > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: <-- > 069186770720F024099186773705F200000160225191124408CBB11B94769BDF > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: received message > from SMSC: +687YYYYYY > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: Numeric sender > (international) <+687XXXXXX> > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: User data length > read as (8) > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: Udh decoding done > len=8 udhi=0 udhlen=0 udh='' > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: <-- OK > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: --> AT+CMGD=0^M > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: <-- OK > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: --> AT+CPMS="sm"^M > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: <-- +CPMS: > 0,60,0,60,0,60 > 2010-06-22 15:19:26 [4760] [6] DEBUG: AT2[huawei_e220]: <-- OK > > BR > > Emmanuel > > > 2010/6/23 Nikos Balkanas <nbalka...@gmail.com> > > Hi, > > No. Bearerbox will always print timestamps in application logs, regardless > to level. Access logs can be customized. You posted bb logs, but didn't > mention if they are localtime or GMT. If they too are with GMT, probably you > compiled it --disable-localtime for whatever reason. Have you checked your > server's time? Maybe it is out of sync. > > I have had no problems with time with either bearerbox or smsbox. > > > BR, > Nikos > ----- Original Message ----- From: Emmanuel CHANSON > To: users > > Sent: Wednesday, June 23, 2010 12:33 AM > Subject: Re: Smsbox & SMS Services -Incoming SMS datetime problem > > > > So it seems to be clearly a bug ? isn't it ? > The workaround can be like Alvajo said of course to handle the TS in the > application. > But do you know if the smsbox behavior can be improved? by a patch ? > > The bearerbox logs does not show any timestamps unless I have to set higher > log level in the modem config ? > > Example for another test: > > bearerbox.log: > 2010-06-23 08:29:56 [11204] [17] DEBUG: send_msg: sending msg to box: > <127.0.0.1> > 2010-06-23 08:29:56 [11204] [17] DEBUG: boxc_sender: sent message to > <127.0.0.1> > 2010-06-23 08:29:56 [11204] [16] DEBUG: boxc_receiver: got ack > 2010-06-23 08:30:09 [11204] [16] DEBUG: boxc_receiver: heartbeat with load > value 0 received > > > smsc.log > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: --> AT+CPMS="SM"^M > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: <-- +CPMS: > 1,60,1,60,1,60 > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: <-- OK > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: --> AT+CMGR=0^M > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: <-- +CMGR: 0,,28 > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: <-- Β > 069186770720F124099186773705F20000016032809205440B503B683D7683E8E5391D > > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: received message > from SMSC: +687YYYYYY > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: Numeric sender > (international) <+687XXXXXX> > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: User data length > read as (11) > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: Udh decoding done > len=11 udhi=0 udhlen=0 udh='' > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: <-- OK > 2010-06-23 08:29:56 [11204] [6] DEBUG: AT2[huawei_e220]: --> AT+CMGD=0^M > 2010-06-23 08:29:57 [11204] [6] DEBUG: AT2[huawei_e220]: <-- OK > 2010-06-23 08:29:57 [11204] [6] DEBUG: AT2[huawei_e220]: --> AT+CPMS="sm"^M > 2010-06-23 08:29:57 [11204] [6] DEBUG: AT2[huawei_e220]: <-- +CPMS: > 0,60,0,60,0,60 > 2010-06-23 08:29:57 [11204] [6] DEBUG: AT2[huawei_e220]: <-- OK > > Regards, > > Emmanuel > > > 2010/6/22 Alvaro Cornejo <cornejo.alv...@gmail.com> > > I had this problem also and after many unsuccessfully tries and > retries, I decided to handle the arrival time of the MO in my app -I > replace TS from kannel with my server local time-. In addition, as my > server is in sync with a ntp server, and all my time logs settings are > based on my time, I can safely work like that > > Regards > > Alvaro > > > > |-----------------------------------------------------------------------------------------------------------------| > > EnvΞ½e y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier > celular y Nextel > en el PerΟ , MΞΉxico y en mas de 180 paises. Use aplicaciones 2 vias via > > SMS y GPRS online > Β Β Β Β Β Β Visitenos en www.perusms.NET www.smsglobal.com.mx y > > www.pravcom.com > > > > 2010/6/22 Nikos Balkanas <nbalka...@gmail.com>: > > > Hi, > > How are bearerbox timestamps? > > By default kannel will use localtime. Unless configured to use GMT: > > ./configure --disable-localtime > > Check also access-log-time in configuration. > > BR, > Nikos > > > ----- Original Message ----- From: Emmanuel CHANSON > To: users > Sent: Tuesday, June 22, 2010 7:55 AM > Subject: Smsbox & SMS Services -Incoming SMS datetime problem > > > Hello, > > I am using Kannel SVN freshly installed from today and I made a simple test > where the SMS is received by Kannel and then through smsbox, trigger an SMS > service url (PlaySMS): > get-url = > " > http://192.168.0.41/playsms/plugin/gateway/kannel/geturl.php?t=%t&q=%q&a=%a > " > > bearerbox -> sqlbox -> smsbox -> PlaySMS > > When I check the PlaySMS database for Incoming MO I see the date equal to: > 2010-06-22 04:19:21 corresponding timestamp is 127718036 but here it is > 15H19: > New Caledonia Standard Time is GMT (UTC) + 11 hours. > > Checking sqlbox database I see for this incoming MO: time: 1277180361, > corresponding date is: 2010-06-22 15:19:21 so SQLBox do its job ie 04H19 + > 11 = 15H19 > > When checking smsbox.log I see: > 2010-06-22 15:19:26 [4807] [9] DEBUG: Parsing URL > ` > http://192.168.0.41/playsms/plugin/gateway/kannel/geturl.php?t=2010-06-22+04:19:21&q=%2B687773502&a=Kcn+info > ': > > So smsbox give a different datetime to the SMS Service, is it normal? > Is there a timezone configuration to set in smsbox ? > > > smsbox.log: > > 2010-06-22 15:19:26 [4807] [4] INFO: Starting to service <Kcn info> from > <+68xxxxxx> to <1234> > 2010-06-22 15:19:26 [4807] [9] DEBUG: Queue contains 0 pending requests. > 2010-06-22 15:19:26 [4807] [9] DEBUG: Parsing URL > ` > http://192.168.0.41/playsms/plugin/gateway/kannel/geturl.php?t=2010-06-22+04:19:21&q=%2B687xxxxxx&a=Kcn+info > ': > 2010-06-22 15:19:26 [4807] [9] DEBUG: Β Scheme: http:// > 2010-06-22 15:19:26 [4807] [9] DEBUG: Β Host: 192.168.0.41 > 2010-06-22 15:19:26 [4807] [9] DEBUG: Β Port: 80 > 2010-06-22 15:19:26 [4807] [9] DEBUG: Β Username: (null) > 2010-06-22 15:19:26 [4807] [9] DEBUG: Β Password: (null) > 2010-06-22 15:19:26 [4807] [9] DEBUG: Β Path: > > /playsms/plugin/gateway/kannel/geturl.php > 2010-06-22 15:19:26 [4807] [9] DEBUG: Β Query: > > t=2010-06-22+04:19:21&q=%2B687xxxxxx&a=Kcn+info > 2010-06-22 15:19:26 [4807] [9] DEBUG: Β Fragment: (null) > > 2010-06-22 15:19:26 [4807] [9] DEBUG: Connecting nonblocking to > <192.168.0.41> > 2010-06-22 15:19:26 [4807] [9] DEBUG: HTTP: Opening connection to > `192.168.0.41:80' (fd=28). > 2010-06-22 15:19:26 [4807] [9] DEBUG: Socket connecting > 2010-06-22 15:19:26 [4807] [8] DEBUG: Get info about connecting socket > 2010-06-22 15:19:26 [4807] [8] DEBUG: HTTP: Sending request: > 2010-06-22 15:19:26 [4807] [8] DEBUG: Octet string at 0xb2e006c8: > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β len: Β 176 > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β size: 1024 > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β immutable: 0 > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 47 45 54 20 2f 70 6c 61 79 > 73 > 6d 73 2f 70 6c 75 Β GET /playsms/plu > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 67 69 6e 2f 67 61 74 65 77 > 61 > 79 2f 6b 61 6e 6e Β gin/gateway/kann > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 65 6c 2f 67 65 74 75 72 6c > 2e > 70 68 70 3f 74 3d Β el/geturl.php?t= > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 32 30 31 30 2d 30 36 2d 32 > 32 > 2b 30 34 3a 31 39 Β 2010-06-22+04:19 > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 3a 32 31 26 71 3d 25 32 42 > 36 > 38 37 37 37 33 35 Β :21&q=%2B687xxxx > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 30 32 26 61 3d 4b 63 6e 2b > 69 > 6e 66 6f 20 48 54 Β xx&a=Kcn+info HT > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 54 50 2f 31 2e 31 0d 0a 48 > 6f > 73 74 3a 20 31 39 Β TP/1.1..Host: 19 > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 32 2e 31 36 38 2e 30 2e 34 > 31 > 0d 0a 43 6f 6e 6e Β 2.168.0.41..Conn > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 65 63 74 69 6f 6e 3a 20 6b > 65 > 65 70 2d 61 6c 69 Β ection: keep-ali > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 76 65 0d 0a 55 73 65 72 2d > 41 > 67 65 6e 74 3a 20 Β ve..User-Agent: > 2010-06-22 15:19:26 [4807] [8] DEBUG: Β data: 4b 61 6e 6e 65 6c 2f 73 76 > 6e > 2d 72 0d 0a 0d 0a Β Kannel/svn-r.... > > 2010-06-22 15:19:26 [4807] [8] DEBUG: Octet string dump ends. > 2010-06-22 15:19:26 [4807] [2] DEBUG: HTTP: Creating HTTPClient for > `192.168.0.41'. > 2010-06-22 15:19:26 [4807] [2] DEBUG: HTTP: Created HTTPClient area > 0xb2e00628. > > Regards > -- > Emmanuel > > > > > > > > -- > Emmanuel > > CHANSON Emmanuel > > Mobile Nouvelle-CalΞΉdonie: +687.77.35.02 > > > Mobile France: +33 (0) 6.68.03.89.56 > @email : emmanuelchan...@gmail.com > > > > > -- > Emmanuel > > CHANSON Emmanuel > Mobile Nouvelle-CalΓ©donie: +687.77.35.02 > > Mobile France: +33 (0) 6.68.03.89.56 > @email : emmanuelchan...@gmail.com > -- Emmanuel CHANSON Emmanuel Mobile Nouvelle-Calédonie: +687.77.35.02 Mobile France: +33 (0) 6.68.03.89.56 @email : emmanuelchan...@gmail.com