Jump to content
Macro Express Forums

Getting Other Country Date and Time


Recommended Posts

I don't understand exactly what you are asking for. If you want to get the time for another country than what the local machine is operating use the Variable Modify Date/Time with the "Integer or Value:" option to add or subtract the number of hours. The one oddity here is that you might have to do two operations since much of India has the distinction of being in a half-hour time zone! You guys are weird. So you need to add/subtract the number of hours then 30 minutes since it only accepts integer values.

 

Don't forget the US is vast and covers 5 time zones. Also not all of our states observe Daylight Saving Time. What's more the exact days of DST observance varies from country to country so by no means is calculating time someplace else a simple proposition.

Link to comment
Share on other sites

Hi Cary,

 

Thansk for sharing the information..

 

I have one question on related this post.. If we are working with the different time zones and our macro is used accross the globe, in this case we need to identify the central time zone and subtract from the local time.

in this case how we can find the server time when the macro running in server.

Link to comment
Share on other sites

By "central time" I assume you mean UTC/GMT. Your language is confusing because there is a "Central" time zone in the US which is UTC-6.

 

Time in computers is generally save in UTC with an 'offset'. It sounds like you want UTC so in that case I would simply get the UTC time from WMI and not deal with all the hassles of the math. So right now my computer things the time is 5:05 PM with an offset of -8 making it appear as 9:05AM to me. Just search the MSDN for WMI and system time. Or search the internet for a VBScript that will return system time in UTC.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...