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

  • SEARCH
  • Home
  • 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 3302778
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:53:17+00:00 2026-05-17T20:53:17+00:00

I am trying to make a small application for a project in which clients

  • 0

I am trying to make a small application for a project in which clients from across the world can use. The problem I am having is that the back-end is setup using XML files that gets generated and uploaded to a shared network and in these XML files I store a date time variable that says when a particular task started and finished. The program crashes at certain load intervals with a format exception and after some research I found out that I need to setup a regional date time parser.

The question that I have is how can I convert the time in the XML file, whether it’s using US, AU, or UK regional settings, and have it use the client’s local settings. This is being done using VS C# 2005 and the .NET 3.5 framework.

Thanks in advance for your help.

  • 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-05-17T20:53:17+00:00Added an answer on May 17, 2026 at 8:53 pm

    The backends should be writing in a standard format. The XML shouldn’t just use the local date format – that way madness lies. The main point of XML is to be an interchange format for computers, not for humans. Unless you’re formatting something for human consumption, you shouldn’t be using local variation.

    So either use a specific format everywhere, specifying CultureInfo.InvariantCulture when formatting, or use dt.ToString("o") or another of the culture-invariant format strings.

    If you’re just talking about a point in time (i.e. the local time doesn’t matter, just the global instant) you should also make sure you use a consistent time zone, where UTC is the obvious choice. For example, use DateTime.UtcNow instead of DateTime.Now.

    Once you’ve got the generation code doing sensible things, consuming it should be very straightforward.

    If, however, you don’t have the luxury of changing the generation code, you may have to resort to passing the right CultureInfo into DateTime.TryParseExact. However, this means that you’ll need to know the culture used to create the file. If the files are being generated in a culture-sensitive way and you don’t know which culture they’re using, you’re basically stuffed. For example, 03/05/2010 could mean March 5th 2010 or May 3rd 2010. Without any more information, you have no way of deciding which to use.

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

Sidebar

Related Questions

I'm currently trying to make a small application that performs different duties. Right now
I'm trying to make a small tool that makes use of the Debugger Engine
i'm trying to make a small project that uses multiple forms (dialogs) for different
Trying to make a make generic select control that I can dynamically add elements
I am trying to make a small java application, and I need the corners
I'm trying to make a MVC 2 web application for a small portal. I
I am trying to make a small application for learning Morse code and I
We're trying to construct an application that can - at the request of logged-in
Trying to make a MySQL-based application support MS SQL, I ran into the following
I'm trying to make a context menu for a control that is linked to

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.