Re: bug with date_convert_universal()
Andreas Fink <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <p0510141cb8b4e8ca0c6b@[10.0.0.2]> |
>On Wed, Mar 13, 2002 at 09:06:58AM +0100, Andreas Fink wrote: >> this is definitively the case. The EMI timestamps are also is in >> LOCAL TIME, not GMT > >Ah, yes. I had forgotten about that. In fact, my experience while >roaming in Hong Kong was even worse: the timestamp is in the local time >of the _sender_, not the SMSC. Messages I got from people in Hong Kong >were marked in Hong Kong time, and messages I got from people back in >Finland were marked in Finnish time, with no indication of timezone. >(In fact, I suspect that the timestamp is generated on the mobile phone, >using whatever time its user has set. Worth an experiment?) > >We probably need a better definition of what the timestamp field >actually means for Kannel. Some SMSC drivers fill in the time of >receipt, others take the time from the message, and not all do this >in GMT. So I think the first question is, what do people use the >timestamp field for? If there are multiple conflicting uses, >then maybe we need multiple timestamp fields -- time of receipt >separate from sending time, and timezone marked separately if known. As we are currently working on our own SMSC code and I just did some stuff with timestamps there I can give you some insights here. When a SMS gets delivered to a mobile phone, the SMSC includes a timestamp field. This timestamp field does contain date + time plus a timezone indicator. This would make a phone being able to display the time in local time providing the phone knows which timezone it is in. Our SMSC sends time out in GMT with Timezone being 0. However the receiving phone, a nokia 6310 does display this as is without converting it to the local time. There is a function in the phone telling it to automatically detect the timezone from the local GSM network but I strongly doubt this works. So the timestamp information from the SMSC is always out of the view of the SMSC. It might indicate the SMSC's timezone but the receiving phone might be anywhere on this world and so it should be the phone who converts it to local time. So far I have not found a phone which does that correctly but I havnt tried too hard to look for one either. Now this is all relevant for the timestamp information carried from SMSC to the phone and it might not be at all the same for timestamps on EMI or SMPP interfaces. All of them however share that the month is 1 based (human readable) compared to zero based (unix gmtime() style). By the way, there is no timestamp in the phone as the PDU sent from the phone to the SMSC doesnt contain one. Your experiment in Hong Kong makes it clear. The people in hong kong who have sent you an SMS where people who used Hong Kong based SMSC's (the ones of their carriers there) where your finnish friends used finnish SMSC's. So its the source SMSC which counts, not the source phone. -- Andreas Fink Fink-Consulting ------------------------------------------------------------------ Tel: +41-61-6932730 Fax: +41-61-6932729 Mobile: +41-79-2457333 Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland E-Mail: [email protected] Homepage: http://www.finkconsulting.com ------------------------------------------------------------------ Something urgent? Try http://www.smsrelay.com/ Nickname afink