Real time From Time Zone information 
Author Message
 Real time From Time Zone information

How can I get a real date/time from tzi returned from
GetTimeZoneInformation?

In other words given

month, weekDay (0-6) and day (where 1=first and 5=last)

so for example

month = 10
weekday = 0
day = 5

translates to the last sunday in october,

now how do I get this as a real date ...

I'm sure there is an api but I can't find it.

Thanks.

--
Mike Tissington, MCSD, MCDBA
Oaklodge Technologies
http://www.*-*-*.com/



Sat, 27 Mar 2004 06:47:20 GMT  
 Real time From Time Zone information


wrote at Mon, 8 Oct 2001 15:47:20 :-

Quote:
>How can I get a real date/time from tzi returned from
>GetTimeZoneInformation?

>In other words given

>month, weekDay (0-6) and day (where 1=first and 5=last)

>so for example

>month = 10
>weekday = 0
>day = 5

>translates to the last sunday in october,

>now how do I get this as a real date ...

I don't understand what it is that you don't understand, but Web <URL:
http://www.merlyn.demon.co.uk/js-dates.htm may help.  If, that is, you
are on-topic in the newsgroup that I am reading.

OTOH, if you're on-topic in vc.mfc, and if that is what I guess, then
see <URL: http://www.merlyn.demon.co.uk/programs/tz-check.pas>; it is a
demonstration Delphi console-mode program using the Win32 API calls.

OTTH, if you want to convert 10 0 5 to, for this year, 2001-10-28, then
see unit <URL: http://www.merlyn.demon.co.uk/programs/dateprox.pas> for
algorithms.

ISTM that all you need do is get the day-of-week of the first day of the
required month, increment to get the required day-of-week, increment for
the stated number of weeks, and go back a week if it's now next month.

--

 Web <URL: http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
 PAS, EXE in <URL: http://www.merlyn.demon.co.uk/programs/> - see 00index.txt.
 Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm  &c.



Sat, 27 Mar 2004 22:50:08 GMT  
 Real time From Time Zone information
Hi Mike,

I am not sure about if there is an API to get the Real time From Time Zone
information. But there is an API GetSystemTime. You can get the real time
with it.

I hope it helps.

Jacob Yang
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2001 Microsoft Corporation. All rights
reserved



Sat, 17 Apr 2004 09:40:22 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to convert local time with specific time zone to UTC time in Win32 API

2. Getting time zone information?

3. How to convert local time to gmt using a local variable time zone per process/thread

4. set date/time/time zone dialog

5. real-time vs. user-time

6. Help!: problem with fast timing for real-time application on PC

7. Real Time and Timing

8. Get Real Time Clock (RTC) time/date

9. Obtain Time Zone

10. Time Zones

11. How to maintain TimeStamp consistency across Time Zones?

12. Dataset DateTime column value affected by time zone setting

 

 
Powered by phpBB® Forum Software