RE: Incorrect Date/Time Bug?

"Oded Arbel" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
> -----Original Message-----
> From: Gaby Vanhegan [mailto:[email protected]]

> I have a Siemens TC35 and the current stable 1.2.0 version of 
> Kannel.  When
> I receive text messages from the device (being used as a 
> virtual SMSC) the
> date stamp of the SMS is corrupted.  It is reporting dates such as:
> 
> 1902-02-01 21:02:28

> I've run out of ideas on this one.  Do I need to set the 
> clock on the TC35?
> Is there a patch to fix this in the current version?

This is an SMSC problem. the time stamp generated by Kannel is extracted from the SMSC generated timestamp in the received message, so if your time stamp is incorrect then the clock on the real SMSC in your provider's network is misconfigured. this is actually quite common - for example, we have a Kannel with several modems connected to it, each using a SIM card from a different provider, and when a message received on all modems at about the same time, each displays a variably different time stamp. the most common mistake is to set the SMSC clock to the correct time, but set the time zone to GMT or another incorrect timestamp, but I've also seen clocks set to simply wrong times.

> Also, I'd like to directly store all incoming messages on any 
> SMSC into a
> MySQL database.

There's no patch or module to handle that internally with in Kannel, but that is no surprise as this is out of scope for the SMS gateway - this is application logic. simply setup a web script to be called from sms-service with all the parameters you require, and then have that web script store the data into a MySQL database. it can easily be done with PHP - the first version we had that did it had something like 6 or 7 lines of code.

> Currently it calls an exec command on the default sms-service 
> which executes
> a script, passing the relevant parameters to it.  However 
> this is still
> subject to the date bug.

An executable might do it too. since timestamps using the AT2 module are undependable, you may want to simply store the time the message arrived on your system.

Also - I am registered to the users list, but have not seen your original question.

--
Oded Arbel
m-Wise mobile solutions
[email protected]

+972-9-9581711 (116)
+972-67-340014

::..
Don't open airlock.
Chances of being rescued
Are negligible.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.