Over a million developers have joined DZone.

How to Retreive the TimeZone Programmatically in Windows Phone

DZone's Guide to

How to Retreive the TimeZone Programmatically in Windows Phone

· Mobile Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

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”.

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda


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

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}