Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time conversion between different time zones

Status
Not open for further replies.

farbodf

MIS
Nov 29, 2000
4
US
1-Is there a function available in VBA that converts a time variable from one time zone to another time zone?
2-Is there a library available that I can call it from VBA and converts a time variable from one time zone to another time zone?
3- What is the logic behind time conversion between different time zones that also supports daylight savings?
(Java has these features in its functions)
 
AFAIK, there are no native time zone functions in VB. The MAPI API includes some time zone functions which may me used by VB. However I have not implemented any of htem and cannot help with their use.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
farbodf,
What are you wanting to use this for? different time zones are calculated by simply adding or subtracting the correct number of hours(using the vb DateAdd() function). It could be handled in one line without using any libraries. as for daylight savings, windows already handles it. As always a more in depth description of the problem would be helpful to anyone trying to help you.
Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
And a bit more thought matey. Different countries have summer time or daylight saving or whatever starting on different days. It's complicated.
 
Also, if your're really going to adjust for the time zones, you need to know HOW much each zone is offset, so the addition can be both the proper number of intervals and the propper TYPE of interval.

As Peter says, it is complicated - at least to do it "Right"!


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
O.K., i see your point on the daylight savings thing but what is this 'proper TYPE of interval' stuff. Yes of course you need to know how many hours each city or time zone is offset but do they have different types of hours in different countries? Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
Ruairi,

Not different types of hours, but some time zones are not full hours. There are several 1/2 hour time zones and at least one 15 minute zone, so to reallly do the right thing, you need to know wheather to add hours or miunutes, and how many of each!

MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top