Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9097655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:10:11+00:00 2026-06-17T00:10:11+00:00

How do I convert a DateTime from the local timezone returned by DateTime.Now to

  • 0

How do I convert a DateTime from the local timezone returned by DateTime.Now to another timezone than Utc. On desktop we have the TimeZoneInfo.ConvertTimeBySystemTimeZoneId(), but it’s not available on windows phone!

This java snippet shows roughtly what I want to do

SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); 
TimeZone tz = TimeZone.getDefault();
format.setTimeZone(TimeZone.getTimeZone("GMT"));
str = format.format(new Date());
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:10:12+00:00Added an answer on June 17, 2026 at 12:10 am

    This is not possible to do using the system libraries as there is no way to create TimeZoneInfo objects other than local and utc. They have also sealed the class.

    You can however use this simple library to enable conversion to non-local time zones.
    https://nuget.org/packages/WinRTTimeZones

    Use it like this:

    using TimeZones;    
    
    public void ConvertTime()
    {
        // Get the time zone we want
    
        var tz = TimeZoneService.FindSystemTimeZoneById("Central Standard Time");
        var dt = new DateTime(1990, 7, 1, 12, 0, 0, DateTimeKind.Utc);
    
        // This time will be central time
        var local = tz.ConvertTime(dt);
    }
    

    When the DateTime is converted it is an easy exercise to format it as you want. I recommend to format the date in the local format (not the local timezone) to make easy for the user to understand the date.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to convert an existing (datetime fields) db from local time ut UTC.
I am using DateTime.ToLocalTime() to convert dates from UTC to local time. My time
How do I convert a DateTime from EST/EDT to GMT but I don't know
I use following function to convert datetimes from UTC to my local time (West
I wrote two extension methods to convert times from local time to UTC and
I need to present all DateTime values as local, but store them as UTC.
hey guys, i want to convert datetime from string, i have string which contains
I'm converting from a local time zone to UTC so when we convert 2010-01-03T11:15:58.840+11:00
I have a requirement to convert a date from a local time stamp to
I want to convert a Joda Time UTC DateTime object to local time. Here's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.