Do u have ne generic solution that will update the time object based on the incoming timezone. This is gonna require some manual programming i believe so was loking otu for a code snippet. Dimple
DimpleSurana
Posts
-
Creating time object of a non local timezone -
Creating time object of a non local timezoneHi David, I really appreciate the code snippets you give me. But i wanted to know that how do i add DST information to it too. For eg. EST timezone see's DST. I idea is that "stLocal" will be given its TimeZone only once & hence forth onwards it should always know its TimeZone's Time including DST. Thanks, Dimple
-
Creating time object of a non local timezone"SystemTimeToTzSpecificLocalTime" Windows Platform SDK call seems to satisy what i want to do. But again to populate the _TIME_ZONE_INFORMATION struct is a problem. Generally it is populated from the local TimeZone (Environment variable). Any Hints/Help to populate this struct with a non-local Timezone data. BOOL SystemTimeToTzSpecificLocalTime( LPTIME_ZONE_INFORMATION lpTimeZone, LPSYSTEMTIME lpUniversalTime, LPSYSTEMTIME lpLocalTime ); typedef struct _TIME_ZONE_INFORMATION { LONG Bias; WCHAR StandardName[32]; SYSTEMTIME StandardDate; LONG StandardBias; WCHAR DaylightName[32]; SYSTEMTIME DaylightDate; LONG DaylightBias; } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION; Also i was wondering if anybody has seen the MultiTimeZone Clock Screen Saver. If the source code of that could be got it would make life simpler. Dimple
-
Adding timezone to a COleDateTime objectOk i have my answer. The rawoffset of the Timezone object cud be used to co relate with the Bias & hence i can achieve what i want Thanks for ur help :-) Dimple
-
Adding timezone to a COleDateTime objectOk these strings make sense wrt to the java.util.TimeZone class. I can get the timezone name from this class like "GMT"/"GMT+5:30". I saw the other eg. u gave using the struct TIME_ZONE_INFORMATION. But my query is what from the java side TimeZone class i can give to the VC++ to get the time on the VC++ side in the concerned timezone:confused:
-
Adding timezone to a COleDateTime objectyup i do know that too but the data i have in hand is a TimeZone id which is java specific. How do i use that value to update my COleDateTime object:suss:
-
Adding timezone to a COleDateTime objectbut how will that help me. I have done study of all the structures of c++.
-
Adding timezone to a COleDateTime objectExactly i was thinking on similar lines cos i do not find ne thing on the C++ side to associate with that Timezone id directly. I will calculate the offset on the java side it self & give it to VC to add/subtract to the COleDateTime object
-
Adding timezone to a COleDateTime objectI am lost since morning to find the co - relation. Since a java applicationis giving me that value Dimple
-
Adding timezone to a COleDateTime objectOk its got nothing to do with COleDateTimeSpan. Actually i have a string like 1259 (for GMT), 1125 (for EST) I need to use that string to update my m_ReadPointer object. so that any time i query for on it is in the timezone of the GMT/EST irrespective of the local system timezone. Dimple
-
Adding timezone to a COleDateTime objectWell GetTimeFormat(..) doesnt have any timezone related stuff
-
how to share one dll with multiple instancethis sounds real interesting let me know how u do it if u do get the answer. in my case i had to add a class to the dll code & create objects for each new client & maintain a map of those objects :)
-
visual c++ funny or its a bug?Yes even i do get 100 Cos v++ is equivalent to a post increment so the answer should be v*v & the value of v is then updated to 12
-
how to share one dll with multiple instanceDo you have access to the DLL code. If yes i cud give u pointers. Else try to find out if the dll is thread safe where multiple client can access it :) Dimple
-
Adding timezone to a COleDateTime objectI have a COleDateTime object initialised in the following way. COleDateTime m_ReadPointer = COleDateTime::GetCurrentTime(); I need to know a way to update the object to reflect the correct datetime given the TimeZone id. For eg. 1259 A Code snippet will be helpful Dimple
-
Question on CEventI have already got the asnwer to my problem from magnus & time doesnt permit me to do ne more on it
-
Question on CEventYup i did that it gives some error
-
Question on CEventthat doesnt work i have tried that
-
Question on CEventthats solves my problem thanx :)
-
Question on CEventOk that solves my problem, thanks :) A new learning for the day