Daylight saving time Strange behaviour

Hi,

I have created an application where I am using
 CTime(  int nYear,int nMonth,int nDay,int nHour,int nMin,int nSec,int
nDST = -1);
 Constructor to change the dates to UTC before saving them to
database.
I have set my timezone to Easterntime(US&Canada) which is 5 hrs behind
GMT.

I entered the following date, 01\11\2006 12:00:00PM.When its converted
to UTC,the date its showing is 01\11\2006 4:00:00PM.

In 2006,DST ended on 29\10\2006,thus ideally it should show
01\11\2006 5:00:00PM.
This behaviour is shown for dates ranging from 30\10\2006 to
4\11\2006.

Analysing the issue,I checked my system date and it was some date of
year 2007.
I checked the DST start and end dates for the year 2007 and came to
know that they are ending on 04\11\2007.Since the above constructor
automatically adjust the daylight saving time thus it might be
possible that it is picking the system dates to decide the DST rather
the the dates entered through the program.

Can anyone suggest any method where in I can automatically calculates
the DST on the basis of the dates enterd in the program.(not on the
basis of system dates)

Thanks!!
-Abhay







0
2/4/2008 7:07:46 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
485 Views

Similar Articles

[PageSpeed] 37

Hi,

Any Inputs on this.

Thanks
-Abhay

0
2/5/2008 5:56:25 AM
Reply:

Similar Artilces:

Appointment times won't post correctly
On the calendar, appointments, meetings, etc. made or received show up on the date and time received or sent; regardless of the actual date or time of the appointment. Is there a setting that will correct this? I've exhausted myself trying to find a fix. Outlook 2003 There is a seperate calendar time zone setting that has to be set in addition to your system clock. Pain in the ass. Go to Options and then select Calendar. You should see the Time Zone button there. Set it accordingly, but be aware that everything in your calendar up to that point will change. "Keith Wilso...

open/save dialog title broken
The title bar of any Office 2003 program's open/save dialog has just a single letter. Any ideas what's broken? tbone ...

office 2003 w/ windows 7 requires reacceptance ot T&C's each time
office 2003 w/ windows 7 requires reacceptance of T&C's each time i open work or excell or any office program. How do I get rid of this? Boot into Safe mode in Windows 7,open any Office app and then accept the terms -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. "mouser830" <mouser830@discussions.microsoft.com> wrote in message news:E7B7602D-F5D8-4559-98EF-A2CCC1E2D6FD@microsoft.com... > office 2003 w/ windows 7 requires reacceptance of T&C's each time i op...

how to save a resource
Hello, my program creates for example a PHP script file. So I can crete a file by CFile and than use CFile::Write method. It's clear. But because this file is quite long, I had this idea. Save this file to resources and when I will need create this file, just load this file from resources and save it to disk. Is it possible? I really do not how :-( Thank you for your advice Robert See Using Text File Resources in VC++ By DGoins http://www.codeproject.com/cpp/usingtextfile_resources.asp -- Un saludo Rodrigo Corral Gonz´┐Żlez [MVP] microsoft.public.es.vc FAQ http://vcfaq.europe.w...

Help With Strange Error When Trying to Save Any Record
I am getting astrane error happens when try to create any new record (Customer, Item, Vendor or Account), the system gives me a message that "Save Operation Failed" and when i click "More Info" the error message is "Could not find stored procedure 'DYNAMICS.dbo.aagGetCompanyStatus'", although i have created alot of items, customers, accounts and vendors before but suddenly this error appeared. Any quick help will be highly appreciated. It would appear that the AAG has something to do with a product produced by American Association of Geographers. I...

Set default time zone for all users
Is there a way to make the time zone default to a certain value so that I don't have to go into every user and change it to the correct zone? No. Each user must change their own timezone settings. I have no idea why Microsoft do not pick up your computers timezone. Hopefully this will be changed in a version 2.0 release "Jack Black" <anonymous@discussions.microsoft.com> wrote in message news:6F5F4A10-B6AD-420C-9ACB-F73A13FDABB9@microsoft.com... > Is there a way to make the time zone default to a certain value so that I don't have to go into every user and change i...

Keyboard shortcut for current date and time
Hi, Ctrl+ ; inserts current date and Ctrl+Shift+; inserts current ti me Ctrl+Shift+; inserts the current time with the date serial as 0 and not the current date's date serial. Presently I am adding the two (ie current date and time) to get the current date and time. Is there a keyboard shortcut that does this? Thanks in advance. Regards, Raj CTRL+; then SPACE then CTRL+SHIFT+; -or- =Now() -- Jim Cone Portland, Oregon USA http://www.mediafire.com/PrimitiveSoftware "Raj" <rspai9@gmail.com> wrote in message Hi, Ctrl+ ; inserts current dat...

Error saving a Shared Workbook
I have a user using a shared workbook and gets an error everytime she does this ONE specific change. She deletes a line and then saves and gets a message that says, "EXCEL.exe has generated errors and will be shutdown by Windows... blah blah blah". If she makes anyother type of changes it saves just fine. I also had another user do the SAME change and that person also got that error message. When the file is changed to "Not Shared" then the line is deleted it saves fine also. The problem is obviously with the file itself and that is shared out. can anybody ...

New Named Range Created Each Time Data Imported into Excel via Macro
I have noticed that each time I import data into an Excel spreadsheet via a macro, a new named range (for the same range) is created. This does not pose a problem, but after a while, I'll have a huge number of named ranges that will never be used. Why does Excel name the range and how can I stop this? I noticed in the recorded macro, there was a line .Name = "drd_5". I commented this out to see what would happen, but it just renamed the range "ExternalData_5". The next one was "ExternalData_6", etc. Thanks, Carroll Rinehart You could refresh with differen...

save imbedded pictures
Got a question... If I try to right-click/SAVE a picture in an Outlook email the format defaults to BMP even if it's something else such as an animated GIF. There is a fix for a similar image save error in IE6 but I can't find a repair for this in Outlook. http://support.microsoft.com/?kbid=810978 addresses exactly this issue in IE6. Does anyone know of a similar fix for Outlook? I would love to be able to pull images from my messages without having to forward them to an account pointed to Outlook Express (which will extract images correctly on my system). Thanks in advance! ...

Save as Excel from Master Project
I am trying to export from a master project with about 8 sub- projects. When I try and export from the master to excel, it does not include certain text fields. Why? Any work arounds? I need the text field (name) to use the excel sheet. How are you exporting? Data lives in the sub-projects, not the master. However, try expanding all sub-projects and try again Not all custom fields roll up to the sub-project tasks, so their data is not available in the master. For this and other reasons (including no risk of file corruption) I usually create new masters every week but no...

time #11
I have set up a spreadsheet with time based on what our company truck drivers work. We work under a DOT rule of 70 hours / 8 days. That means that the driver can not work more than 70 hours in an 8 day period. The sheets I have (one for each month) goes back 7 days plus the current day and calculated how many hours a day the driver works and subtracts it from 70, leaving how many hours they can work the next day. If the calculation gets to 0 or above, the cell changes color to alert me that the driver's 70 hours are up and he/she has to have 34 hours off before he/she can be on duty ...

why I see times new roman?
I have several html email messages composed in outlook express 6, I'm sure I highlited all text and set it to Arial 10. Then I drag the file to desktop, move it to vista windows mail draggin into inbox or other folder. The result is some parts of text shows arial 10 but some others Times new roman 10 or 12 what is annoying, because I use all arial 10, so I have to manually forward the email, highligh it again and set arial 10 and then, yes, I can see it properly. I checked the compose default font and everything is fine. Why is that? Is there any work around , helo...

prompting to save workbook every time (even when no changes made)
i have 3 workbooks all very similar and every single time i open any o them, even when not changing anything, i am prompted to save th thing. its so bad that i can literally open the workbook then click the clos button straight away and it STILL prompts me to save it because i seems to think something has changed. as far as i can see i dont have any macros or anything that will ru every time it starts and change something (i did have a = today in on cell which kept the date as today but taking this out made n difference -- Message posted from http://www.ExcelForum.com Hi Neowok! You prob...

Times Subtraction Whith Access
Hi I need to know how to subtract between two times variants and to get a time result (With Access). Like this: VarTime=[time1]-[time2] 10:05:40=18:05:50-08:00:10 Thanks Access really isn't intended to do things like that, but ?Format(#18:05:50# - #08:00:10#, "hh:nn:ss") 10:05:40 -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) <bennyzamir@gmail.com> wrote in message news:1175704084.566444.282820@b75g2000hsg.googlegroups.com... > Hi > > I need to know how to subtract between two times variants and to get a > time res...

Repeat statements "x" number of times...
Hi All, I have the following code at the end of a long macro: Columns("D:D").Find(What:="total").Select ActiveCell.Offset(0, 4).Range("A1").Select ActiveCell.FormulaR1C1 = "=Sum(RC[-1]-RC[-2])" ActiveCell.NumberFormat = "0.00" ActiveCell.Font.Bold = True With ActiveCell.Interior .ColorIndex = 6 End With What I am doing is when the word "total" appears, it will go to the cell 4 columns to the right, and then do a formula and format the cell. Question: How can I get this to repeat itself for eac...

IE6, Time to say goodbye?
An article in the Wall Street Journal on 1-22-2010 titled "Microsoft Scrambles To Patch Browser" states the the Goverment of France and Germany publicaly announced that internet users not use IE, that users switch to a competing software until Microsoft issues a security patch. (The patch was resleased this week) To read the article go to : http://online.wsj.com/article/SB20001424052748703405704575015421102972994.html The following is a quote from the article and includes a comment from Microsoft: "The current security hole in Internet Explorer also highligh...

Date & Time
Hi, I have a form called frmDetails and I have set a text box (txtDate) in the form with the control source of =Format(Now(),"dddd"", ""mmm d yyyy"", ""hh:nn:ss ampm") but the problem is I want this Time & Date to be recorded in the table (called tblDetails) as it needs to be used for referancing when entries were entered into the database. Can anyone tell me how to do this. Thanks Fiona Control source should be the table column. Make the default value your Now() etc. -Dorian "fiona.innes@metacor.co.uk" wrote: > Hi, &g...

Saving a macro
I have an excell file which i want to be able to share, it has macros that allow times to be added and saved. i was wondering if there was a way to make this a file which cannot be altered, only info. added. like a template file, to prevent deletion of the macros? On 11 Jul, 05:18, Bill <B...@discussions.microsoft.com> wrote: > I have an excell file which i want to be able to share, it has macros that > allow times to be added and saved. i was wondering if there was a way to make > this a file which cannot be altered, only info. added. like a template file, > to prevent d...

Events template not saving entries
I am attempting to build an events database using the Events template in Access 2007. I have made no modifications to the template. It is not saving the information I add into the Event List table. I first tried entering information directly into the table. Then I tried entering information using the New Event in the Link bar. I can find no way to get the entries to save. Has anyone else had this problem? Is there a fix somewhere? Does anyone have anything to suggest? Thanks. -- M'Lou *:) On Sun, 7 Mar 2010 05:05:01 -0800, M''Lou Wilson <MLouWilson@discussions....

Export (or save as) .csv with text delimiters
Has anyone found a way of coercing Excel 2000 to export .csv files with delimiter text? e.g: as "Mickey Mouse","Minnie Mouse","Donald Duck" not Mickey Mouse,Minnie Mouse,Donald Duck Thanks Caroline -- CarolineP ------------------------------------------------------------------------ CarolineP's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=20007 View this thread: http://www.excelforum.com/showthread.php?threadid=345941 http://www.mcgimpsey.com/excel/textfiles.html -- Regards, Peo Sjoblom "CarolineP" <Car...

Displaying time from 00:00 to 0.00
I want to do the opposite to what I have seen on the forums and convert time back to decimals ( I work on aspreadsheet but it has been passworded so I can't crack it. :) I want to be able to write (van out) (Van back in)(Total Van time) 7.25 11.25 4.00 Can anyone help me please ( or a way to crack passwords):cool: -- North for Short ------------------------------------------------------------------------ North for Short's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=22695 View this thread: http://www.excelforum.com/showthrea...

save string as unicode
This problem is solving itself piece by piece. I have a legacy VC 6 application and have to fix it to produce a unicode file. By turning on 'see display unicode string option on under tools/options/debug' I now know that the string I have actually does have the unciode entity. But the routine used bty the application to save any strings is not working correctly - it saves the unicode as ?. Can anyone show me a very simple code snippet to do this ! I know there is information about settiings...I need to be able check this large application for the settings, ( help please ), drop in t...

Utility to process rules based on message receive times?
Hi, Does anyone know of a utility that will check a mailbox and process Outlook rules based on how long a message has been in an inbox, and/or remained unread? Thanks! Jeff Yes, there is at least one - Auto-mate. http://www.slipstick.com/addins/auto.htm#special -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips: http://www.outlook-tips.net/ Outlook & Exch...

Why became my database file 5 times larger in Access 2007?
I have a database in Access 2000 file format witch I have developed for several years. The filesize is 4,9 MB. When I resently moved this file to my new notebook with Windows Vista and Access 2007, and filled it with with a certain amount if information (not that much, there was allredy some ground information written to it), I notized the file size had grown to 26,8 MB, more than 5 times larger. I have allso another copy of the same database on my notebook, witch I only have opened a couple of times and not written much to. This file has not grown at all. Anyone who knows what this is ...