473,385 Members | 2,028 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,385 software developers and data experts.

Daylight saving time calculation

Hi guys,

I have to make a event signup page for our company that would display
the event time/date in 3 different time zones (Eastern - New York,
Central - Chicago, and Pacific - San Francisco). To do this. I convert
the inputed date from local time zone and convert it into UTC and store
it in the database (correct me if I'm wrong please). Next to display it
I would add the correct time zone difference value (-5 for Eastern).
How to do I handle the daylight saving time though? For example the -5
Eastern time is right now -4. Is there a way to do this automatically?
Any samples would be greatly appreciated.
Thanks
M.

Oct 13 '06 #1
1 2386
You're right, keep UTC value in database and then display calculated user's
local time (to check if the asp.net sever is in daylight saving time period
use System.TimeZone.CurrentTimeZone.IsDaylightSavingTi me(...))

hope this helps
--
Milosz Skalecki
MCP, MCAD
"mazdotnet" wrote:
Hi guys,

I have to make a event signup page for our company that would display
the event time/date in 3 different time zones (Eastern - New York,
Central - Chicago, and Pacific - San Francisco). To do this. I convert
the inputed date from local time zone and convert it into UTC and store
it in the database (correct me if I'm wrong please). Next to display it
I would add the correct time zone difference value (-5 for Eastern).
How to do I handle the daylight saving time though? For example the -5
Eastern time is right now -4. Is there a way to do this automatically?
Any samples would be greatly appreciated.
Thanks
M.

Oct 14 '06 #2

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

Similar topics

14
by: Amitabh Deepak | last post by:
Is there any way to check whether daylight saving is enabled on a linux machine?
1
by: Drew | last post by:
Is there a way to check if it is daylight savings or not via c#? I have heard you can use System.Globalization? Thanks - Drew
7
by: Brett Edman | last post by:
I created a UTC clock using this: UTCTime = MyTime.ToUniversalTime() Now that we've turned the clocks ahead 1 hour for daylight savings time, the clock is reporting the wrong UTC time. It is...
6
by: Robm | last post by:
Since googling this issue only brings up the April fool's problem, which was solved years ago, I hope that somebody can help me with this. I have a large vc++/mfc application which needs to know...
1
by: maflatoun | last post by:
Hi everyone, I have 3 different time zones that I'm working with. Basically converting from UTC to those 3 time zones. Eastern Daylight Time (GMT -04:00, New York) Central Daylight Time (GMT...
1
by: maflatoun | last post by:
Hi everyone, I have 3 different time zones that I'm working with. Basically converting from UTC to those 3 time zones. Eastern Daylight Time (GMT -04:00, New York) Central Daylight Time (GMT...
1
by: luke_airig | last post by:
I'm not sure if this is the right group for this posting. If not, please accept my apologies. I have been tasked with identifying and correcting application code that will be affected by the...
6
by: sugapablo | last post by:
I have an old machine running Mandrake 9.2 and PHP 4.3.1 hosting several websites. With the coming changes to daylight savings time in March 2007, what are my options in correcting the current...
27
by: RobG | last post by:
I was investigating a function to determine whether daylight saving was being observed on a particular date (given the platform's regional settings) and came across a suggestion at merlyn.com to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.