Click here to Skip to main content
12,952,725 members (37,320 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello Friends,

I have a problem regarding DateTime Time Zone change on my client WPF application.

The situations are like this,

1) I have Server on US. Both Database and ApplicationServer is on the system.
2) I have Client application is in India.


As server and client both are at different places The TimeZones are also differs. Problem is that when client see the record with date '20-May-2012' is actually '19-May-2012' in database server.

The application is 3 Layer Application View - Service - Database.
Here Service and Database is on US server. I am getting DataTable from service side.
Please let me know what kind of changes i need to Done.
Posted 7-Aug-12 22:43pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I refer to you the response[^] I gave some time ago :)

Pay particular attention to item 1
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I am not sure but you can use Globalization.

using System.Globalization;
CultureInfo ci=new CultureInfo("gu-IN")
Datetime dt= DateTime.Parse(TextBox1.Text.ToString(),ci);

Let me know if it works.
milannaughty 9-Aug-12 11:26am
Thank you for your response. I have to Sync my server's and clients' timezones.
Is there any way to resolve this?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,289
CHill60 3,490
Maciej Los 3,103
Jochen Arndt 1,975
ppolymorphe 1,900

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 8 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100