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:46:56 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Time & Time Zones

2. time zones and daylight saving time

3. Formatting Time to GMT when current Time Zone not known

4. Time zone offset and day light saving.

5. Determine Time Zones???

6. time zone

7. Chaniging time zone

8. Time Zone Question for Torgeir

9. Time Zones

10. Prompt for the Time Zone and to Set it

11. Programmatic Time Zone Conversion (VBScript 5.0/ASP)

12. How to Get Time Zone?

 

 
Powered by phpBB® Forum Software