ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
how do i convert time to VRT? (Sdk)
how do i convert time to VRT? // SdkalexthemartianMar 22, 2002, 3:57am
hey how do i convert the time to VRT in vb? and how can i put the VRT time
in a status bar panel? dionMar 22, 2002, 11:42am
On most Windows systems, they ask for your timezone. I'm sure that a VB
program could get that information on what timezone that person lives in. I know that VRT is +3 from EST timezone. That would mean it's -2 from the UK timezone. If you can find out the information on the person's timezone that is running the program, you will need to find out what timezone they're in and change the time according to that. Check out some Visual Basic sites. Infact, I'm sure microsoft has a whole library full of those commands and you could just search up timezone :-P [View Quote] dionMar 22, 2002, 11:49am
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tdhelp40/ht
m/timezonesettings.asp There's a better way there. You can just simply tell it you want the timezone -2 from GMT (i think it's -2....) and that'll automatically figure the scale for you ;-) Any extra info can be found pretty easily at http://support.microsoft.com/default.aspx They have a nice library of VB stuff for developers. Just put your things in the search ;-) [View Quote] grimbleMar 22, 2002, 6:28pm
Although the local timezone is clearly important since that's the time you
have available, windows gives you a mechanism to find out what you need to know. VRT is GMT - 2 (the middle of the Atlantic somewhere), which you can get from Windows very easily using the GetTimeZoneInformation windows API call. The SDK only gets one notification of the current VRT ... in the AW_EVENT_UNIVERSE_ATTRIBUTES event. Because of this, you have to maintain the VRT value yourself. each time you want to update the display. There are three stages to handling VRT ... (1) When you receive the AW_EVENT_UNIVERSE_ATTRIBUTES event (after a successful login), calculate and store the difference between the value in supplied in the AW_UNIVERSE_TIME attribute and the local time on the client machine at that point. Note that the VRT value is the number of seconds since midnight on 1st Jan 1970 and so you need bear this in mind. You can get a relative date/time by using VB's DateAdd function: datetimeVRT = DateAdd("s", awSDK.AwUniverseTime, "1 Jan 1970 00:00:00") HOWEVER, this will be based on midnight 1st Jan 1970 IN YOUR TIMEZONE and will result in a date/time close to the current date/time IN YOUR TIMEZONE. (2) Immediately after performing (1) ... i.e. still in the event handler ... calculate the difference between the current date/time on your machine and the value caluclated in (1). This will be the difference between the relative VRT and your local time and should be a number of seconds. offsetVRT = DateDiff("s", datetimeVRT, Now()) the value in offsetVRT will need to be available later. (3) Each time you want to display the current VRT you will need to apply two offsets to your local date/time ... the minor difference between the two clocks (offsetVRT above) and the GMT - 2 adjustment. The first is simple using VB's DateAdd function again, but the GMT value is where the Windows API call comes in. I'm not going to go into it here, but I've attached a small project that shows VRT on a form after logging in. The module modTimeZoneSupport is taken from code I found in a vbCity forum, but basically the GetUTCTime function will return GMT. Then you just need to apply a -2 hour time difference with DateAdd (yet again) and Robert's your father's brother ... VRT. Don't expect to match the AW Browser VRT display ... it won't happen through design, purely by coincidence. Hope this helps. Grims. Grims. [View Quote] begin 666 VRT Demo.zip M4$L#!!0````(`-B<=BQ9K[%CHP<``'8;```7````5E)4($1E;6\O9G)M5E)4 M1&5M;RYF<FWM6&UOXD at 2_AXI_Z'%2IM$"JQ)(,GL*BN9E\QP1P!A$R9S6J$& M-^"-Z49V$Y)9[7^_JC:VV\:8VYT]W7U8:V"(Z[WJZ:JRG]I#J]/OD7K%,$Y/ M^M-?V4R2>U+ZK?IP?5NKW5R7[VH/M7*UVJJ73>/#;=DPZD;#K)EW#\;#[]]5 M*\9W1NDG4C+'5NN?_>;G6 at 6^2J<G#;9P.7EJ5!Z$OR)S?_4TM%ML)<CI"2&D M2=?2%9Q$USU\2LA9+85TSV5<?F+N8BDC>M7X4->(73:7B?"-H9%LL=;T7M=T ML;'KR&5,J]W<A8)=E[^ F#L[X) UHQY+_$D[I(B)XK1F2U)?CM8#$; at J9.42 M(6=CESMB&Y 6F].-)Q5OG+2F6*TH=QH;*4%D/;4DA*18R('D(4<IXFAS.O68 MD^(PX'/V0+V 15Q:.#'7]6T](B<)ULB&841TFTX[W&%O.CT63DJ0$&\262U9 M,3E.9YL[Z6S8[HKY1*Y\P%"<A0Z7S'^E7EI%8B+/_=J5YGZ!AWL>[-<#BGJL M(, 25^2_D.O"2*I7?S+773IE'O&FWH/+/,=VI<>*XX2:Q%$J+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NK]8.J+1XQW#3/_!E!+`P04````" #9G'8LDP8\ M^;T!``"^` at ``% ```%925"!$96UO+U925$1E;6\N=F)P99)-;YM $(;O2/P' M"RYM):.U33[:B ,!TZ+4Q at K4;BM?%C,DF^X'6A;'293_WEUP8[7EL'KG&<W. MS+L43PT$\P/85B(D"VK)UK=%#$QX6MK6+=0 at at >\ at ^+#]_((0FB)_AL9:'(_H MCQH^__S5G7K(16[T:;M)EW&VR;?YC[R8+[:MJ at 2%J:=HZ69?YZ.P4X)A102W MK:Q\ at )T*7B;)[,+WSV?C2S_QQY-)?#8.T<<+W>$,78=^>)F at Y-6=F Y7HW"3 MQS=9]-WW]&%;"U%U% (FJH(P^"DXY%W3"*FN1O\SK\2M;:4[P?N]G=/BCFWE M"DO5-?_02#"&>36;!HZ.EIA!X)RR7X VD> *#BJ-`P<-!8W>KZ2 at 1X.!+?"# MD&N0P41KP at >-C-%[TFHKCJ'Q)N4["0RX.K(<Y![D<?Z$4& at --4T([6TLS%MJ ME#6*,/+\%TOP7LB5OHQT;"7%.\7>#]45K D\QE!V=RFOA8%+$5*"6\+O3'0M M.EZUT3WL?O67ZQEJ*A[?0$)7 at G!UBN-T_19\X]*40Y6L^A6,L;T9?0XK!28Y M&* PX8,N[B7 at : at 7R^%L at X]MAV;%2HWK(ML;!WU!+`P04````" #9G'8LY UX M%U ```! at ````% ```%925"!$96UO+U925$1E;6\N=F)W2RO*#0L*<4G-S5>P M53 QT0%C,W-#'05C(R,=!1T%$ G"9B:60#$#`QT%9UZNW/R4D,S<U*C\O-3 at MTH*"_*(2H&XS,QT(MC0&J at 29$\7+!0!02P,$% ```` at `RI!V+(J[3S8^! `` MV P``!\```!64E0 at 1&5M;R]M;V14:6UE6F]N95-U<'!O<G0N8F%SK59=3^,Z M$'U'XC^,JM5M<M4ME'U9K82N2BAW*]$6T0):7BHG<5HOB1W9#MGRZW?LU#2! M\"%V^]"/R?&9F3/CZ0RUEBPL-(7KD^649!2.H9.)>,$R>BLXG1=Y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JEI+BMR$; Q5 MCM,"=3"RM';&-KKA=#X^*9*$2D_AYZZL3YIEG&#[XT^+ZL$_WP]]6*PIM]&W M\F'\YS31VP//#G^& at 4U]E"KZ*HD-JPM<`,>$>J $Q()W-91"R at V04!1XL;3E M0IG&R>N2 at 2%WDMDUF$ NF.U<E(_ %6=F&=M"^J^)9TN;YNKAQC5]RQ5[=EEJ M75(9/WENY_3<:H*4/OP+1UNQNG!D6U8=1+:>CW<B$OFFRJ(9-EX+3(;3$D*K MHT&W+:/5,FZ][/8B=-Z#SP-GP%![6$KNX1=_"\6W;<O6I&BT?;VQ\%S;Q/H- M4$L#! H``````$)_=BP````````````````)````5E)4($1E;6\O4$L!`A0` M% ```` at `V)QV+%FOL6.C!P``=AL``!<``````````0` at `+:!`````%925"!$ M96UO+V9R;5925$1E;6\N9G)M4$L!`A0`% ```` at `V9QV+),&//F]`0``O at (` M`!0``````````0` at `+:!V <``%925"!$96UO+U925$1E;6\N=F)P4$L!`A0` M% ```` at `V9QV+.0->!=0````8 ```!0``````````0` at `+:!QPD``%925"!$ M96UO+U925$1E;6\N=F)W4$L!`A0`% ```` at `RI!V+(J[3S8^! ``V P``!\` M`````````0` at `+:!20H``%925"!$96UO+VUO9%1I;65:;VYE4W5P<&]R="YB M87-02P$"% `*``````!"?W8L````````````````"0```````````! `_T'$ B# at ``5E)4($1E;6\O4$L%! at `````%``4`30$``.L.```````` ` end |