×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    2

    Question How to get the current timezone name ??

    Hello everyone,

    I needed help in getting the current time zone name ( standard name or the daylight saving name).
    Here is the code snippet I use:
    <code>
    RTz tzServer;
    User::LeaveIfError(tzServer.Connect());
    ...
    CTzConverter* ctzConverter = CTzConverter::NewL(tzServer);
    TInt timeZoneId = ctzConverter->CurrentTzId();
    CTzId* zoneid = CTzId::NewL((TUint)timeZoneId);
    ...
    CTzLocalizer *localizer = CTzLocalizer::NewL();
    CTzLocalizedTimeZone* timezone = localizer->GetLocalizedTimeZoneL(*zoneid);
    ...
    // check for timezone->StandardName();

    </code>

    But I get a KNullDesC upon return for simezone->StandardName().
    Is there anything wrong in the code I am using?
    Are there any settings which I am missing?

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: How to get the current timezone name ??

    yes this has know issues and has been discussed more then once in the DiBo http://discussion.forum.nokia.com/fo...d.php?p=366808

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    2

    Re: How to get the current timezone name ??

    Are there any solutions to this problem or no one has been successful in retrieving the timezone name?
    Any help would be greatly appreciated.
    Thanks

  4. #4
    Registered User
    Join Date
    Nov 2008
    Location
    Mumbai-India
    Posts
    379

    Re: How to get the current timezone name ??

    Quote Originally Posted by rajath_r View Post
    Are there any solutions to this problem or no one has been successful in retrieving the timezone name?
    Any help would be greatly appreciated.
    Thanks
    have u go thru the below link

    http://discussion.forum.nokia.com/fo...d.php?t=116875

  5. #5
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: How to get the current timezone name ??

    Quote Originally Posted by pandhari.gorde View Post
    as you can see in above code rajath is already getting the TimeZoneID but not the NAME

Similar Threads

  1. Error in packaging process :(
    By a-eqla3 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2008-07-24, 20:33
  2. How to get a current time with TimeZone offset
    By ratl in forum Mobile Java General
    Replies: 0
    Last Post: 2002-05-16, 05:02

Posting Permissions

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