By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,173 Members | 1,049 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,173 IT Pros & Developers. It's quick & easy.

Convert Time for any Date to UTC

P: 2
I need to be able to work out the UTC time given the local system time for any date in the year. I live in the UK and at the moment the time is GMT+1:00, however when we return to DST it will be GMT+0:00. The conversion method from local time to UTC time is therefore different depending on the time of year.

I need to calculate the time offset between local time and UTC time for any date in the year. Can anyone suggest a suitable method for achieving this?

Ive seen some javascript which does exactly what I want, but there appears to be no easy way to do this in vb6.

(Date(Year, Month, Day, Hour, Minute, Second)).getTimezoneOffset()*(-60)
Jul 10 '09 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.