473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Time zone

We have a c# application (with about 100 forms, and 300+ tables on sql
server).

We have several customers who use that application but everybody gets
the copy of the database. Structure of the database is same, but with
different data. All the databases reside on the same server/same
instance.

We need to make that app time-zone aware. Is there a way in SQL
Server 2000 database (or web.config file) to change the time zone?
This way we won't have to change much in the application or database,
we will just change the setting to "eastern" or "central" timezone and
everything will fall in place. Otherwise we will have to touch so
many tables and forms that it could take weeks/months.

Any quick solutions?

Thanks

Mar 14 '07 #1
5 2373
Hi,

"Sehboo" <Ma*********@gmail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
We need to make that app time-zone aware. Is there a way in SQL
Server 2000 database (or web.config file) to change the time zone?
This way we won't have to change much in the application or database,
we will just change the setting to "eastern" or "central" timezone and
everything will fall in place. Otherwise we will have to touch so
many tables and forms that it could take weeks/months.
If you change the setting to the server it will change ti globally so it's
not good for you.

Can you detect some how from what timezone a particular client is coming
from?

Mar 14 '07 #2
Well, what if I change the database setting?

Yes, I know exactly what timezone to set for each customer, and since
all the customers have their own database, there won't be any
confusion, but how/where to set timezone in database?

On Mar 14, 10:20 am, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions.comwrote:
Hi,

"Sehboo" <MasoodAd...@gmail.comwrote in message

news:11**********************@n59g2000hsh.googlegr oups.com...
We need to make that app time-zone aware. Is there a way in SQL
Server 2000 database (or web.config file) to change the time zone?
This way we won't have to change much in the application or database,
we will just change the setting to "eastern" or "central" timezone and
everything will fall in place. Otherwise we will have to touch so
many tables and forms that it could take weeks/months.

If you change the setting to the server it will change ti globally so it's
not good for you.

Can you detect some how from what timezone a particular client is coming
from?

Mar 14 '07 #3
VJ
This client based, not sure if changing things in sever is going to help.
Even if you alter anything in the DB or Webserver, that will change other
requests coming to the server from different time zone. Almost like a ASP
page reading client time, based client side scripting.

So if you are doing to client based, that means you are going to have to go
through the change.. Guess no easy way out, if that is what you looked for.

VJ

"Sehboo" <Ma*********@gmail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...
We have a c# application (with about 100 forms, and 300+ tables on sql
server).

We have several customers who use that application but everybody gets
the copy of the database. Structure of the database is same, but with
different data. All the databases reside on the same server/same
instance.

We need to make that app time-zone aware. Is there a way in SQL
Server 2000 database (or web.config file) to change the time zone?
This way we won't have to change much in the application or database,
we will just change the setting to "eastern" or "central" timezone and
everything will fall in place. Otherwise we will have to touch so
many tables and forms that it could take weeks/months.

Any quick solutions?

Thanks

Mar 14 '07 #4
Sehboo wrote:
Yes, I know exactly what timezone to set for each customer, and since
all the customers have their own database, there won't be any
confusion, but how/where to set timezone in database?
I think you are taking the wrong approach.

Store all time info in DATETIME columns.

Never let the server set the time - always set the
time from the client apps.

Always use parameters both to set and get the time.

Then it should always work, because
the timezone of the server does not matter. You send
binary time forth and back all the time.

Arne
Mar 15 '07 #5
I would add another thing. Always get, set, calc, and store only UTC
datetimes. That way, you never have any date confusion. Your client side
can easily convert to/from UTC so they can display local times. This also
makes it possible for same client to store a record in home time zone and
change their time zone when they travel and still get and use the datetime
correctly because it converted from UTC and it just works even on their new
timezone.

--
William Stacey [C# MVP]
PCR concurrency library: www.codeplex.com/pcr
PSH Scripts Project www.codeplex.com/psobject
"Arne Vajhøj" <ar**@vajhoej.dkwrote in message
news:45***********************@news.sunsite.dk...
| Sehboo wrote:
| Yes, I know exactly what timezone to set for each customer, and since
| all the customers have their own database, there won't be any
| confusion, but how/where to set timezone in database?
|
| I think you are taking the wrong approach.
|
| Store all time info in DATETIME columns.
|
| Never let the server set the time - always set the
| time from the client apps.
|
| Always use parameters both to set and get the time.
|
| Then it should always work, because
| the timezone of the server does not matter. You send
| binary time forth and back all the time.
|
| Arne
Mar 15 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: MLH | last post by:
I would like to be able to look up any 5-digit ZIP in a table that would show the correct time zone for the area. For example, I would like to look up 91915 in the table and see something that...
3
by: Jon Davis | last post by:
The date string: "Thu, 17 Jul 2003 12:35:18 PST" The problem: // this fails on PST DateTime myDate = DateTime.Parse("Thu, 17 Jul 2003 12:35:18 PST"); Help? Jon
10
by: Marc Pelletier | last post by:
Hello, I am writing an application that does some simple astronomical calculations. One of the variables I need is the number of hours passed in this year. I've written the following function ...
2
by: Avi | last post by:
I have a problem to get the different time zone's name for example I need the name of time zone UTC + 4:30 ("Kabul") The TimeZone.CurrentTimeZone get my current time zone name and I couldn't...
1
by: Clodoaldo Pinto Neto | last post by:
Hi all, I want to have the time zone string (like 'BRT') displayed after a date-time. The date column is of the type timestamp with time zone. But the time zone is not displayed. It works for...
14
by: Cesar Ronchese | last post by:
Hello! I've built a program that show some dates to users. I got a problem when users have different configured time zone machines, where: - One machine that determined time zone the date...
2
by: Mike | last post by:
I'm writing an application for Windows XP Embedded. This application requires that the user be able to change the time zone from within the application. I'm trying to do this using...
3
by: Satish Itty | last post by:
Hi all, I have a big problem in my hands and not sure how I can fix this. Any suggestions would be greatly appreciated. I have a .NET 3 tier app developed in VS2003 and .NET 1.1. the client is a...
7
by: Steve | last post by:
Hi All I have a windows application written in VB.net 2005 The users have to select a State of Australia, which I use to check they have the correct windows time zone selected in control panel...
7
by: Correia | last post by:
I have a webserver that is in another country and have a different time zone. How can i fix this and use the scripts with the correct time zone? Thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.