×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    68

    How to read GMT + settings of a phone.

    Hi,

    I have reading the details of message recieved. When i read the date at which the message recieved it give me an entry of GMT time
    but now my phones time is set GMT +5:30 i.e of india . So how do i come to know how much time is set relative to the mean time and how can modify accodingly....

    my code to return date of message entry is ...

    Code:
        TMsvEntry msvEntry;
        TMsvId serviceid;
        
        User::LeaveIfError(iSession->GetEntry(id,serviceid, msvEntry));
        return msvEntry.iDate;
    Please help

    Pramod
    "Nobody will believe in you unless you believe in yourself."

  2. #2
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: How to read GMT + settings of a phone.

    You can get the difference programatically using the TTime class.
    The following code will give you the current time set on the device. You can find out the difference between the two times and get your value.

    Code:
    	TTime currentTime;
    	currentTime.HomeTime();
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,750

    Re: How to read GMT + settings of a phone.

    Since you get timestamp in TTime, check its documentation in the SDK Help. Especially the "See also" section.

  4. #4
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    68

    Re: How to read GMT + settings of a phone.

    Thanks guys for u r replies....

    I did it in much simple way

    User::LeaveIfError(iSession->GetEntry(id,serviceid, msvEntry));
    return msvEntry.iDate+User::UTCOffset();
    Pramod
    "Nobody will believe in you unless you believe in yourself."

  5. #5
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    68

    Re: How to read GMT + settings of a phone.

    i have a new problem now

    using User::UTCOffeset() give the phone time....
    can i get the time through network.....

    Pramod
    "Nobody will believe in you unless you believe in yourself."

  6. #6
    Regular Contributor
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    340

    Re: How to read GMT + settings of a phone.

    The APIs are not public.
    Regards,
    Sainagakishore Srikantham (Kishore)

    Don't Hope, KNOW!!! ---------- Visit me at http://ssnkishore.blogspot.com ----------

  7. #7
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    68

    Re: How to read GMT + settings of a phone.

    can u still give me the details on the APIs if you know, I would then think of partnering or becoming a pro member....
    "Nobody will believe in you unless you believe in yourself."

  8. #8
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    68

    Re: How to read GMT + settings of a phone.

    when i change the phone time behind the current time such that there are some messages which have come after the time set,and i recieve a new message it will not be the first message in inbox but the message details in the native phone application it shows the network time of the message not the phone time.

    now when i am trying to extract message time from the Message entry in the phone it give me the phone time not the network time.

    so how do i show the network time when the message was recieved ?

    Pramod
    "Nobody will believe in you unless you believe in yourself."

Similar Threads

  1. Replies: 4
    Last Post: 2009-03-17, 08:20
  2. Replies: 2
    Last Post: 2007-02-06, 15:16
  3. Replies: 1
    Last Post: 2006-07-03, 18:29
  4. j2me phone can't able to read plain text from servlets - why?
    By mibuyt in forum Mobile Java General
    Replies: 5
    Last Post: 2003-09-29, 13:30

Posting Permissions

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