473,480 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help with DateTime and TimeZones / DayLight savings time

We're implementing Daylight savings time in our new software, and I'm having
an issue codeing it.
We're storing:

Month (ie: 10)
WeekDay (ie: Sunday)
WeekNumber (ie: 3 - 3rd Sunday in the month, or -1 - last sunday in the
month)

THe reason we're doing this is because different cities in Canada have
different change dates, and in 2007 the US will be different than canada on
when it changes from DLT to Standard (we should just modify the work
schedule and not the time) anways, I'm finding it hard to do the following:

I have the month, and the year. However, trying to find the Day of the month
from the WeekName, and how many weeks that name is in the month is a bit
tedios.

Can anyone suggest anything on this?
Nov 19 '05 #1
1 1169
I found that VB.NET has a DatePart function, but of course MS didn't put
that funcion (the DateandTime libraries) in C#... !
"Ryan Ternier" <rt******@icompasstech.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
We're implementing Daylight savings time in our new software, and I'm
having an issue codeing it.
We're storing:

Month (ie: 10)
WeekDay (ie: Sunday)
WeekNumber (ie: 3 - 3rd Sunday in the month, or -1 - last sunday in the
month)

THe reason we're doing this is because different cities in Canada have
different change dates, and in 2007 the US will be different than canada
on when it changes from DLT to Standard (we should just modify the work
schedule and not the time) anways, I'm finding it hard to do the
following:

I have the month, and the year. However, trying to find the Day of the
month from the WeekName, and how many weeks that name is in the month is a
bit tedios.

Can anyone suggest anything on this?

Nov 19 '05 #2

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

Similar topics

6
4242
by: Dave | last post by:
Hey folks, I'm moving from ASP to PHP and I must say that on using this for only a day it is MUCH simpler to get things going. Already have made a VERY basic blog site for myself in a very...
8
3164
by: Shlomi Schwartz | last post by:
Hi all, Why do I get the folowing date when creating it like so: var d = new Date(2003,9,2); Wed Oct 1 23:00:00 UTC+0200 2003 Isent it soposed to be:
1
2763
by: Adam Monsen | last post by:
Say I have the following datetime object: >>> from datetime import datetime >>> d = datetime(2005, 8, 10, 15, 43) I happen to know this is a local time from the Netherlands, so I assume the...
1
3781
by: James | last post by:
I need to import a bunch of data into our database for which there's a single entry each day which occurs at the same time every day in local time - so I need to convert this to UTC taking into...
0
986
by: Bill | last post by:
My computer is a client in the central timezone with daylight savings. I need to pass a time and a value to the server via webservices (for example, the price of electricity at each hour in the...
1
1083
by: lf | last post by:
Hi, I need to do some timezone conversions and am not sure how to do what I want to do with the 1.1 framework (which is what we are using here). My issue is this: I have information that I need...
27
5276
by: Sanjay | last post by:
Hi All, I am using pytz.common_timezones to populate the timezone combo box of some user registration form. But as it has so many timezones (around 400), it is a bit confusing to the users. Is...
4
1420
by: Laszlo Nagy | last post by:
def str2datetime(s): #28 May 2008 12:38:16 BDT return time.strptime(s,"%d %b %Y %H:%M:%S %Z") #.... some code here.... print repr(pd) print str2datetime(pd) Result:
5
2101
by: Ivan Velev | last post by:
Hello, Minimal example below - it gives me different output if I comment / uncomment the extra time.mktime call - note that this call is not related in any way to main logic flow. When...
0
7049
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
6912
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
7092
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
5348
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
2989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
565
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
188
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.