×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Wrong value comes when reading sms details

    Hi All,

    I am reading inbopx, draft and sent folder, i retrieve sms body, number date and time. Body and Number is fine but when i retrieve sms created date and time that comes wrong, like 23/10/2008 date sms shows 22/09/2208 and time 11.30 pm is 18:59, is that any way to read sms details in write format.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Wrong value comes when reading sms details

    What is the difference in time between the two?
    What timezone are you in (ie difference between it and GMT)?
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  3. #3
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Wrong value comes when reading sms details

    Quote Originally Posted by Paul.Todd View Post
    What is the difference in time between the two?
    What timezone are you in (ie difference between it and GMT)?
    I am in india timezone is +5.30 EST.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  4. #4
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Wrong value comes when reading sms details

    The message details in mobile inbox is date: 23/10/2008 and Time: 11:59 pm, but i read date: 9/22/2008 and time: 18:29, there is much difference, it is one month back.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  5. #5
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Wrong value comes when reading sms details

    I am reading date and time like following.

    Code:
      TTime date = 0;
    	date = iSMtm->Entry().Entry().iDate;
    	TDateTime td = date.DateTime();
    	TInt day = td.Day();
    	TInt hour = td.Hour();
    	TInt Min = td.Minute();
    	TInt month = td.Month();
    	TInt year = td.Year();
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Wrong value comes when reading sms details

    Quote Originally Posted by aamitgupta View Post
    The message details in mobile inbox is date: 23/10/2008 and Time: 11:59 pm, but i read date: 9/22/2008 and time: 18:29, there is much difference, it is one month back.
    Reading the documentation of TDateTime:ay/Month, and reading Paul's comment may both benefit you.

  7. #7
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: Wrong value comes when reading sms details

    Quote Originally Posted by wizard_hu_ View Post
    Reading the documentation of TDateTime:ay/Month, and reading Paul's comment may both benefit you.
    Even I had the same problem then I realised the TMonth starts from 0 i.e EJanuary is 0 so when you are displaying you need add one. SDK help is best place as Wizard suggests.
    Regards,
    Sriky

  8. #8
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Wrong value comes when reading sms details

    Quote Originally Posted by sriky27 View Post
    Even I had the same problem then I realised the TMonth starts from 0 i.e EJanuary is 0 so when you are displaying you need add one. SDK help is best place as Wizard suggests.
    Can you give any example code to do this, i am not aware to do this, please help me.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Wrong value comes when reading sms details

    Amit, what kind of code??? Do not you know how to add numbers? Use the + for that.

  10. #10
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Wrong value comes when reading sms details

    Quote Originally Posted by wizard_hu_ View Post
    Amit, what kind of code??? Do not you know how to add numbers? Use the + for that.

    I add +1 at day and month field now it is ok, but another issue comes, in simulator i check sms detalis, it is right, data and time is rightm but in phone it is wrong, in phone we create a sms entry date 03/11/2008 and time 3:35 PM, but in my log file date shows right but time shows wrong time is 10:5, i do not what is the problem, why in simulator time is correct and in phone it is wrong.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  11. #11
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Wrong value comes when reading sms details

    I saw another thing in simulator, when i run simulator and check time it shows 10:27 AM , now i go to menu and again back to main screen now time shows 04:06 PM. Please help me what is the problem, in phone why time is not right?
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  12. #12
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Wrong value comes when reading sms details

    I think this is taking default time jone time, so how can i convert, please help me
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  13. #13
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Wrong value comes when reading sms details

    This is GMT time that shows in my log, how can i convert it current time settings of phone.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

  14. #14
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Wrong value comes when reading sms details

    If you open TTime's documentation in the SDK Help, it contains a "See also
    timezoneconversion: Using the time zone server" Have you tried that?

  15. #15
    Registered User
    Join Date
    Jul 2007
    Location
    Noida
    Posts
    1,503

    Re: Wrong value comes when reading sms details

    Thanks for showing interest, i fixed the issue.
    Regards,
    Amit


    ****"Putting a Smile on other's faces is the essence of true Happiness"****

Similar Threads

  1. Reading SMS in a specific Port (Running from background)
    By amishra in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2008-08-11, 22:07
  2. Replies: 2
    Last Post: 2007-11-10, 13:19
  3. Replies: 2
    Last Post: 2005-08-10, 10:02
  4. Getting SMS Message/Header Details - Series 60 C++
    By periakaruppan in forum Symbian
    Replies: 0
    Last Post: 2005-08-08, 04:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×