ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Sync'ing with VRT (Sdk)
Sync'ing with VRT // SdkrobbieJul 21, 2003, 8:14am
Hey all,
I'm working on Nox 3.4 and I'm a bit stuck. When the bot starts it needs to sync with VRT time to resume the cycle. In Nox 3.3 I used modTimeZone.bas and some code from Grimble to calculate the time difference between local and Unvierse Time on login but the code was buggy and the VRT time was missed calculated on many machines. I need a good solid way of calculating the VRT time accurately that will not behave differently on different machines and OS's. Does anyone have a good reliable way of doing this and a bit of code they can help me out with? Thanks, -Robbie ananasJul 21, 2003, 12:57pm
There are 2 functions to get the time, one is
localtime, the other gmtime. As gmtime and VRT are in a fixed relation you can also easily calculate the difference between VRT and local time (if needed) - but maybe you will not even need the local time at all and can just use the GMT. I'm not familiar with VB but that's how it works in C and as those C functions are based on kernel functions I'm quite sure it can work just the same in VB. (The NG server seems to have eaten the first posting attempt, sorry if it appears twice now) [View Quote] kfJul 21, 2003, 1:36pm
VB can, via Windows API call, also get the GMT and the settings for the
local time zone (which you need to calculate the actual time difference between VRT(=GMT-3) and the local time). Another, very easy, method would be to have people put in the time difference to GMT into the ini file of the application and then work internally only with GMT-3 +- x [View Quote] mr.visualbasicJul 24, 2003, 3:28am
well i don't know but i can tell u this vrt time is nothing but United
States' pacific time bowenJul 24, 2003, 4:49am
[View Quote]
He's about 5 hours the wrong way... :O?
-- --Bowen-- No of SETI units returned: 44 Processing time: 36 days, 0 hours. (Total hours: 864) www.setiathome.ssl.berkeley.edu kahJul 24, 2003, 10:14am
"mr.visualbasic" <ssbroly135 at aol.com> wrote in news:3f1f6e76
at server1.Activeworlds.com: > well i don't know but i can tell u this vrt time is nothing but United > States' pacific time Actually, it's a timezone somewhere in the Atlantic. It's supposed to be a compromise between US and european time (I doubt AW has a lot of customers in the rest of the world, except Australia perhaps). KAH percipientJul 24, 2003, 4:48pm
GMT has no DST, as far as I know. It's always constant, as is VRT. As I
recall, VRT is two hours behind GMT. [View Quote] percipientJul 24, 2003, 4:50pm
If that's so, how come I have to subtract six hours (five during DST) off of
VRT to get my local time (Pacific)? Is my Pacific time that badly off because it's Canadian Pacific time? [View Quote] ananasJul 24, 2003, 5:33pm
It is not an AW invention, afaik. they have choosen the time
zone with the lowest inhabitants count. [View Quote] kahJul 24, 2003, 10:48pm
"percipient" <percipient at {spamthis}percipients.com> wrote in
news:3f202a64 at server1.Activeworlds.com: > If that's so, how come I have to subtract six hours (five during DST) > off of VRT to get my local time (Pacific)? Is my Pacific time that > badly off because it's Canadian Pacific time? Because it's wrong :-)) See the other replies. KAH |