DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > How to Retreive the TimeZone Programmatically in Windows Phone

How to Retreive the TimeZone Programmatically in Windows Phone

Senthil Kumar user avatar by
Senthil Kumar
·
Feb. 29, 12 · Mobile Zone · Interview
Like (0)
Save
Tweet
4.49K Views

Join the DZone community and get the full member experience.

Join For Free

Windows Phone users can set the time zone via the Settings -> Datetime Form in the Windows Phone.

By default , the time zone was “UTC +05:30 Chennai,Kolkatta,Mumbai,New Delhi” on my Windows Phone that was set via the “Set automatically” option.

How to Retrieve the TimeZone Programatically in Windows Phone

 

How to retreive the TimeZone programatically in Windows Phone ?


If you want to retreive this information (Timezone) , you can use the TimeZoneInfo.Local property that is defined in the System.Security NameSpace.

TimeZoneInfo.Local includes the properties StandardName and DisplayName to display the time zone.

txtTimeZone.Text = TimeZoneInfo.Local.StandardName;


The StandardName will display the complete text like “UTC +05:30 Chennai,Kolkatta,Mumbai,New Delhi”

txtTimeZone.Text = TimeZoneInfo.Local.DisplayName;


The DisplayName will in turn display the Zone Name like “India Standard Time”.




Windows Phone

Published at DZone with permission of Senthil Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Spring, IoC Containers, and Static Code: Design Principles
  • Major PostgreSQL Features You Should Know About
  • Anatomy of a Webhook HTTP Request
  • Remote Debugging and Developer Observability

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo