Conversion of UTC time to Local time.

I need to convert UTC filetime to Local filetime. Function
FileTimeToLocalFileTime() can conver only current timestamps ( it does not
use daylight saving time valid for that time, but only the currect DST
settings ). Is there any other way to do it ?

Thanks in advance,
Kamil


0
k
7/22/2003 2:33:25 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
717 Views

Similar Articles

[PageSpeed] 53

I didn't found the first article. In the second one
'SystemTimeToTzSpecifcLocalTime' unfortnately I found this in my copy of
MSDN :

SystemTimeToTzSpecifcLocalTime uses the current settings for the time zone
and daylight saving time. Therefore, if it is daylight saving time, this
function will take daylight saving time into account, even if the time you
are converting is in standard time.

It is probably a mistake, but I have another question - How can I revert
Local time to UTC time ? I know that for some dates/times results can be
invalid, but when I use WinAPI they will be not valid even there is 1:1
conversion beetwen local time and UTC ( when DST of that time and the
current DST will not match ).

Thanks,
Kamil

U�ytkownik "CheckAbdoul"
<636865636B6162646F756C406E6F7370616D2E6D7670732E6F7267> napisa� w
wiadomo�ci news:eaUOWUGUDHA.2280@TK2MSFTNGP10.phx.gbl...
> See KB articles
>
>     Q245786 - HOWTO: Convert from GMT(UTC) Time to Local Time
>     Q128126 - HOWTO: FileTimeToLocalFileTime() Adjusts for Daylight Saving
> Time
>
> --
> Cheers
> Check Abdoul [ VC++ MVP ]
> -----------------------------------
>
> <k> wrote in message news:uN4lc5FUDHA.1712@TK2MSFTNGP11.phx.gbl...
> > I need to convert UTC filetime to Local filetime. Function
> > FileTimeToLocalFileTime() can conver only current timestamps ( it does
not
> > use daylight saving time valid for that time, but only the currect DST
> > settings ). Is there any other way to do it ?
> >
> > Thanks in advance,
> > Kamil
> >
> >
>
>


0
k
7/22/2003 5:31:52 PM
Reply:

Similar Artilces:

Formatting cells with Time data
I'm trying to set up my spreadsheet to format my cells to hhmm, but every time I try to enter data into the cells, the system automatically converts the hours I've entered into a date and leaves the time value at 0 any suggestions as to what I'm doing wrong? Are you entering as hh:mm regardless of the cell format? -- __________________________________ HTH Bob "yimkhoc" <yimkhoc@discussions.microsoft.com> wrote in message news:A481A01F-0938-4F38-A93C-F2B9CB0BD34C@microsoft.com... > I'm trying to set up my spreadsheet to format my cells to hhmm, but ev...

Time functions #2
Hi, I have to do some time calculations and I have a formula that outputs in minutes and I have to subtract a standard time to this number of minutes. For example, I have 8:00 AM in one cell and 20.68 minutes on an other cell. The output that I am expecting is 7:39 AM. Does anybody know how to bring an output like that by subtracting the minutes? Please help. Thanks With 8:00 AM in A1 and 20.68 in B1, use this formula =A1-B1/(24*60) Why does it work? Because Excel stores time as a fraction of a day. We convert minutes to days by dividing by 24*60 (24 hr/day and 60 min/hr) You could just u...

Run Time Error '1004' Application or Onject-defined
Hi all. I am having a strange problem with the below code in that it produces the run time error when trying to Paste the Selection. However, if I perform the action manually in exactly the same way, as in recording the macro in the first place, it works!? How can I get this to run - it is after all, a really simple code. (Most frustrating) Thanks, Wes. Windows("Transaction_Record.xlsm").Activate Sheets("DETAILED_PMNTS_REC").Select Range("N2077:QV2089").Select Application.CutCopyMode = False Selection.Copy Windows("AUDIT_TR...

convert Times New Roman Special G1 into arial
hello. I need to convert a text written with font Times New Roman Special G1, which I downloaded from the internet, into a font availanble in most computers, such as arial. Can you help me please? Thanks a lot. Fabian This newsgroup is for questions about Access, the database product that's part of Office Professional. I suspect you're asking about how to do this with some other product. I'd recommend reposting to a newsgroup related to whatever product it is you're trying to use. If you are talking about Access, please explain what exactly it is that you downloaded fro...

Calculating Time Difference
Hi, I am trying to develop a query where my client wants to track how much time in minutes does a nurse spend in various activities (staff education, patient/family education, answering drug relation questions etc. etc.) to assist nurses in other units. What query type should I use? How do I write the query? There is a start time (when the nurse recieves the call) and completion time (when the nurse hangs up). Thanks Mrinalini <drmrinalini@gmail.com> wrote in message news:1176645431.981118.294870@e65g2000hsc.googlegroups.com... > Hi, > > I am trying to develop a query wher...

Getting local Time and date for the local computer(vista OS)
Hi I am working with Vista(one of a kind), and have a MFC application and would like to add small code that will get current time and date from the local compuetr. i meet an example in MSDN : http://msdn.microsoft.com/en-us/library/aa390423(VS.85).aspx but it looks too long for what i am looking, is there a 1 function API that returns the Date and the time ? thanks for your time Zack >Hi I am working with Vista(one of a kind), >and have a MFC application and would like to add small code that will get >current time and date from the local compuetr. >i meet an example in MSDN...

Publisher 97 and date/time print
I am designing an office card using 1997 Publisher. No matter what I do it prints day, month,year and time on every page. I have checked background and there is no text box even there to delete to stop this problem. How can I find and delete? This will be an option of your printer driver. Disable that option and your trauma will be over. -- ...

Calculate meeting timings
Hi, I had one requirement. I want to calculate my total meetings time i spent througout the week, month or year. This will help how to manage my time between my work and meeting. Any solution to this??? ...

program loading time
The money 05 loads very slow, I have archived everthing past 90 days but it still loads slow. Any suggestions? In microsoft.public.money, oltexasboy wrote: >The money 05 loads very slow, I have archived everthing past 90 days but it >still loads slow. Any suggestions? Restore the archive as your main file, if you have not gone too far with it since the archive. Archiving did not help your speed appreciably, and you might want to refer to that older data. Consider reducing scheduled bills. Remove accounts from the budget if you think that would be appropriate. Set your start page t...

after some time sent mail turns as i symbol mail why?
sent mail turns with i symbol in sent items when i' using outlook. why it is happening so and what does it mean? It means you are tracking that email for voting or other purposes. =20 See http://www.howto-outlook.com/howto/icons.htm --=20 Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. After furious head scratching, Stalin asked: | sent mail turns with i symbol in sent items when i' using | outlook. why it is happening so and what does it mean? ...

entering time
Is there a way to set up a cell so that I can type in 1330, and have Excel put in the colon so it reads 13:30 (military time)? right click sheet tab>view code>insert this. As written, works on a1:a100 Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) 'Ron Rosenfeld <ronrosenfeld@nospam.org> Dim InputRange As Range Dim Temp As Variant Dim i As Integer Dim Separators(2) As String Separators(0) = ";" Separators(1) = "," Separators(2) = "." Application.EnableEvents = False Set InputRange = [A1:A100] 'or whatever If Intersec...

processor time allocation
My app routinely only gets 10 to 30 % of CPU time - the system idle process gets the rest (indicated by windows task manager) My app is multithreaded and has one thread that requires lots of CPU time at 20 Hz intervals. I sleep this thread for an amount of time that would put it at the next 20 Hz interval. My other threads sleep when they are not busy. My 20 Hz thread does not recieve the processor time that it needs - even though the system idle process is taking up 70 to 90 % of the CPU time. If I remove the sleep call from my 20 Hz thread then it hogs all of the CPU time and the s...

Outlook takes long time in new message with word 2003 as editor
Good Day Urgently need help in troubleshooting a problem which is spread among many clients in which Outlook takes long time when you create or reply first message after starting outlook , our clients are windows XP with SP3 and the Microsoft office is office 2003 with SP3 , My machine suffers from this error although i have patched it to the latest updates from Microsoft update , I have Mcafee Viruscan Enterprise 8.5.0i and i have disabled access protection when outlook startes but it did not solve the problem Apprecite quick advice and any troubleshooting tips Ahmedg You mentioned e...

How to make Bullen's FilterCriteria() data refresh real-time?
Using XL 2003 & 2000 OK, with help, I was able to utilize Steve Bullen's FilterCriteria() Function. That said, apparently the only way to refresh the data in the display cell is to re-activate the formula by pressing <ENTER> in the Fx Box. Can the display cells be made to refresh in real-time or, second best, by F9? FYI (Background Info): ************************************************************II placed this formula into cell A1: =FilterCriteria(A3) Cell A3 contains the Autofilter down-arrow for column A ************************************************************* Fu...

Upgrade 6.0->7.5->8.0 with PA
I am conducting a test upgrade from 6.0 to 8.0 through 7.5 with Project Accounting on a test server. The PA conversion to 7.5 took about 11 hours which is manageable but the conversion to 8.0 has already taken 3 days! and is still running. It has spent most of the time on one particular task and I wondered if anyone else has experienced this and if there is any way to improve the situation. All I can see from SQL Profiler is that the auto-procedure zDP_RM00401SS_1 is being called for each row of that table in turn sometimes many times for the same row. There are about 28000 rows and I&...

Outlook meeting request time off
User A sends User B a meeting request for Thursday at 2:00pm til 4:00pm. User B accepts. The problem is that the meeting shows up on user B's calendar at 1-3. One hour behind. It shows up on User A's calendar at the correct time from 2-4. I checked all the time settings in the OS and Outlook on both computers and they are correct. The only difference is that User A has Windows NT and User B has Windows XP. I try the same test from another user's computer who has NT. Same problem. When the XP user sends a meeting request to the other XP user the time shows up in both of the...

Real time data in visio ?????
I have developed a screen in Visio choosing the Process Engineering category and placed a label on the screen to display the data continously . The data is picked up from the file say c:\test.txt.This file (c:\test.txt)is updated with random data from a simulator program running on the same machine. This program works fine when i run from Visio. The value gets updated on the screen every second. But when i use Visio viewer to deploy my application the application opens automatically in IE 5.0. I am able to view all the screens and navigate also. But my label control does not show any change of...

Network Password entered each time Outlook starts
I have Office XP Pro with Outlook 2002 and EVERY time I start up Outlook it asks me to enter my Network Password. I do and check the box to remember my password but is shows up again next time. Anyone know how to get it to accept the password? I had Office 97 and Outlook 97 before and never had this problem. I have already installed Office XP Service Packs 1 & 2. brunyon@knoxy.net If you are still having problems after applying both the SP 1 & 2 patches, then see if this article addresses your problem OL2002: The Save Password Setting Is Not Saved When You Connect to a POP...

Timing-Out Error Message for 1 MB Attachment
I'm getting a Timing-Out Error Message when I send an attachment that's about 1.0 MB. It started after some (Microsoft, I think) updates and it seems like it should be easy to change some criteria in Outlook, but haven't found it yet. I can still send the attachment thru BellSouth/DSL mailbox, so why won't Outlook handle it? Any help would be appreciated. ...

Calculate the total overlapping time of multiple tasks, excluding non-working times
I am developing a tracking calculator for an overall process. Within the overall process, there are 3 steps which are completed. These steps can be completed independently from one another, but can also (sometimes) overlap. I am trying to determine the total time for the overall process (from beginning to end), without counting the duplicated times where the steps are running parallel to one another, or times when some steps may be completed and are waiting for another to start. I have outlined the basic design of the worksheet below, with times in mm/dd/yyyy hh:mm format. S...

EWS and constant reminders
If a person created a reoccurring event using Entourage 2008 when Standard time was in effect for an event that begins during Daylight time (for example a reoccurring event beginning in May was created back in Jan) than when the event reminder is generated later it pops up every minute for the event despite being dismissed each time. When viewing the event using Outlook 2007 - Standard time is listed in the description. To fix the issue the reoccurring event has to be recreated during the same time adjustment period. I've had to do this for annual events (birthdays) that were c...

Time Zone Adjustment
Maybe someone can help me with the following question: I use Vista and Outlook 2003. How can I change the Time Zone without the stored appointments being changed, e.g. my laptop is set for European time (GMT +1), but now I'll be in South Africa (GMT +2) for the next couple of months. If I change the Time Zone all appointments get moved by 1 hour, which I obviously don't want since an appointment set for 0830 is still 0830 and not 0930. Any thoughts? Thanks help. Richard You'll either need to leave the computer in the old TZ or change it and set outlook to use 2 TZ. You...

HELP: Add textbox to a frame at run time
Hi All, How can I add text boxes on the form at run time based on what user inputs in a textbox? For eg: I have a textbox "Total Students" , so Once I input a number in that textbox, I want to have that many textboxes on the form during run time. If I input 4 I want four textboxes to be displayed on the form. Thanks in advance ...

Control the day & time in project accounting ( timesheet & equip.
We need to control the time sheet in project accounting as follows: No same time should be allowed to be entered on the timesheet & equipment log for the same project & cost category. In addition, the times should be controlled in way not to allow an employee to work on 2 or 3 projects at the same date & time. In addition, no equipment should be to work in 2 or more projects at the same date & time Thank you -- Joseph Abou Nader MCSA MCBMS Specialist ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes....

Exchange Server 2003 - pop3 connector
Hello all Our Exchange Server 2003 calls our ISP hourly and downloads all email for our domain from a catch-all pop3 account. When users are reading mail the time stamp which appears is the time which the email was downloaded by our server. What we want to be able to see is the time the email was created by the sender. Does anybody know how to do this? Many thanks Fin The way to go is to use SMTP rather than POP. You'll then see the time that the mail was received into the system, which will be a better representation. If you need to know where a delay was you can look at th...