|
|
Hi,
I am not able to download anything from this article i.e demo,data,source code.
Please help me out.
Thanks and regards,
CraZyToLearn
|
|
|
|
|
I was able to download all three items. The site may have been having problems when you tried, you are behind a firewall or something of that nature. There appear to be problems with other links on the site. If you still have a problem, try contacting one of those running the site. Perhaps post a question on http://www.codeproject.com/script/comments/forums.asp?forumid=1645[^]
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I was wondering if you (or anyone else) has updated the data tables to reflect timezone changes since the timestamp on the data files of 6/2003. If not, what did you use for your initial data source and/or compilation methodology?
Any help will be appreciated,
Jimmy
|
|
|
|
|
|
Today I've loaded to Microsoft patches because of changed timezone rules in several countries. Is there an update of your timezone data available?
http://support.microsoft.com/kb/929120
http://support.microsoft.com/?kbid=928388
Regards,
Ralf
|
|
|
|
|
I updated it a month ago. The current data set, with a few exceptions, is now current. One exception is the Palestinian Authority which is constantly changing DST. There are at least two other countries which have started DST that have been changing dates; the current data set reflects the dates for 2006-2007 for this countries.
(Also note that Israel's DST cannot be quantified by simple data since it's based off of the date of passover. The data set here is for 2007.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
That's great, thank you!
Here are some additional differences from my updated data file:
"URU","Uruguay","",-180,3,0,1,2,1,0,60,10,0,1,1,2,0
"AZB","Azerbaijan","Last Sunday in March @ 4 a.m. - Last Sunday in October @ 5 a.m.",240,10,0,1,5,4,0,60,3,0,1,5,4,0
"CAU","Caucasus","Last Sunday in March @ 2 a.m. - Last Sunday in October @ 3 a.m.",240,10,0,1,5,2,0,60,3,0,1,5,2,0
"JOR","Jordan","Last Thursday in March @ 0 a.m. to last Friday in September @ 1 a.m.",120,9,0,6,5,0,0,60,3,0,5,5,0,0
"BCB","Brazil Central","First Sunday in November at 02:00:00 Last Sunday in February at 02:00:00 ",-240,2,0,1,5,1,0,60,11,0,1,1,2,0
"PAR","Paraguay","First Sunday in October @ 2:00 a.m. to first Sunday in March @ 2:00 a.m.",-240,4,0,1,1,1,0,60,9,0,1,1,2,0
"BEA","Brazil East","First Sunday in November @ 2:00 a.m.- Last Sunday in February @ 2:00 a.m.",-180,2,0,1,5,1,0,60,11,0,1,1,2,0
"URU","Uruguay","",-180,3,0,1,2,1,0,60,10,0,1,1,2,0
"EET","Eastern European","Last Sunday in March @ 2 a.m. GMT - Last Sunday in October @ 3 a.m.",120,10,0,1,5,3,0,60,3,0,1,5,3,0
"LEB","Lebanon","Last Sunday in March @ 0 a.m. - Last Saturday in October @ 0 a.m.",120,10,0,7,5,23,0,60,3,0,1,5,0,0
"R01","Russia Zone 01","Last Sunday in March @ 2 a.m. - Last Sunday in October @ 3 a.m.",120,10,0,1,5,2,0,60,3,0,1,5,2,0
"AUW","Australia West","Last Sunday in October @ 2 a.m. - Last Sunday in March @ 3 a.m.",480,3,0,1,5,2,0,60,10,0,1,5,2,0
"AUE","Australia East","First Sunday in October @ 2 a.m. - Last Sunday in March @ 3 a.m.",600,3,0,1,5,2,0,60,10,0,1,1,2,0
"NZ","New Zealand","First Sunday in October @ 2 a.m. - Third Sunday in March @ 3 a.m.",720,3,0,1,3,2,0,60,10,0,1,1,2,0
|
|
|
|
|
there are not completely understandable explanations in the article, which way
can people use CTimeZone ?
If the usage of CTimeZone is forbidden in the commercial products, please,
let me know ASAP.
I have mentioned you and CTimeZone in the "Credits" section of the Help file.
Please, check this. If everything OK, or I should make credits some another way?
The product site is: http://www.timestimator.com/
I have added a lot of new places into the TimeZoneData.tzd.Locations and TimeZoneData.tzd.
If you need these "extended" files, please, let me know, I will provide them for you.
If you found Timestimator useful for you, of course, you are always welcome for free license (when the program become completely commercial)
With the best regards, Vit
|
|
|
|
|
The main purpose of this class was for a server to handle client data coming from multiple timezones. If a developer can find another use for this class, all power to them.
You can use this code any way you see fit as long as I am indemnified by some mechanism in your own licensing agreement (this would apply to any third party software.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
How to decide that specific timezone has daylight Saving facility?
e.g (GMT+5:30)Chennai, kolkata, Mumbai, New Delhi - this Timezone is without daylight Saving and (GMT-9:00) Alaska is daylight Saving timezone
Can u tell me in VC++ how to check it?
|
|
|
|
|
I don't know what you're asking. You can check the region you live in and if it has daylight savings time.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I have one object where I store information for any time zone,
Example :
Name : India Standard Time
display name : (GMT+05:30) Calcutta, Chennai, Mumbai, New Delhi
Hrs difference with respect to GMT : 5
Min difference with respect to GMT : 30
Etc:
I read these information from system registry and create time zone collection.
Now based on these information I want to know whether particular time zone belongs to daylightsaving time zone or not…
or
based on these information I want to create instance of timezone(class available in C#), and if you help me out to create timezone instance then I could easily get daylightsaving flag for that timezone.
So can you please tell me how to create timezone instance with above information?
Sachin Gedam
(Software Engg.)
Pune India
|
|
|
|
|
The only way I can think of is to match the name with a list, such as the one this article provides. That isn't entirely reliable since there are locations that are split between having daylight savings and not.
If you are using the .NET class TimeZone.CurrentTimeZone(), it has a method TimeZone.IsDaylightSavingTime().
The alternative is to convert the information in this class to C# or compile it as managed C++ code (haven't tried that, so don't know if it would work.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
But TimeZone class only work for current time zone, and i want to make instance of specified time zone.. so i am not able to use this time zone class.
And only TimeZone class gives provision to identify DayLightSaving flag.
Is there any way to get this flag from registry?
Windows timezone dialog box shows this type of provision that means that dialog box also reading this value from somewhere.. so can you help me in that direction?
Sachin Gedam
(Software Engg.)
Pune India
|
|
|
|
|
In XP; HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones contains a list of time zones. I do not know how the data is deciphered. I seem to recall reading somewhere that this list is not always guaranteed to be complete in all versions of XP.
An alternative is to use the data list from this article.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thanking you for your kind support and knowledge sharing.. i get very good sample which uses WinApi and registry.
http://www.codeproject.com/dotnet/WorldClock.asp?df=100&forumid=126704&exp=0&select=1411038
this sample agreed to my expectation.
Sachin Gedam
(Software Engg.)
Pune India
|
|
|
|
|
Hello Joe
I have found that if the "Local Time Zone" and "Remote Time Zone" are equal the function "ConvertTime" calculates bias of "Remote Time Zone". The "remote" time must be equal to the "local" time in this case, but they are different.
for example LocalTimeZone and RemoteTimeZone are "Acre State, Brazil" both. GMT-5 both
and if I set for the LocalTimeZone 22:45, then pLocalTimeZone->ConvertTime(time, pRemoteTimeZone) calculates 17:45
With the best regards, Vit
|
|
|
|
|
While poorly documented, if the local and remote time zones are the same instance, it converts the time to UTC time. (If the remote time zone is NULL, it converts from UTC to local time.)
This was a poor design choice, but probably made total sense at the time. I have modified the code so it is more clear. Do note that this may break existing apps that depend on the old behavior.
I will post the new code soon.
|
|
|
|
|
-
- - -
With the best regards, Vit
|
|
|
|
|
With the upcoming changes to DST in both the USA, and in Canada (well, Ontario, so far...)
A simple reference.
TZCode is a library/Database I used in a previous life:
http://www.twinsun.com/tz/tz-link.htm[^]
And a more direct download link:
http://public.planetmirror.com/pub/timezone/?M=A[^]
If I understand correctly Linux seems to rely on this package, but either way, it provides a cross-platform (C++) solution that does not rely on Windows, I had it compiling under 6.0, and just provides you another option (which has it's own drawbacks, too.)
If someone else doesn't update the database, at least you can yourself.
|
|
|
|
|
Hi, good work on this class. It's definitely a lot of work ...
Could you tell me where the latest version of the code might be?
Also, there seems to be a bug/typo in CTimeZone::GetDiff that I believe the 2nd IsDaylightTime call should read: secondZone.IsDaylightTime.
Ok, good work, I appreciated the code.
|
|
|
|
|
Until just now, the latest version was above.
I believe you are right about the bug. I've made the change and tightened up that code and will be sending in the update.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
There's a bug in GetDaysInMonth(WORD month, WORD year) as it does not return the correct number of days for februari for century breaks.
See http://www.merlyn.demon.co.uk/leapyear.htm#Leap for an explanation.
In short: Every Gregorian Calendar year divisible by 4 is leap, except if it is divisible by 100 but not divisible by 400
|
|
|
|
|
That was quite intentional; the code this was based on is still being used in an environment where it is called thousands of times a second. Moreover, it's actually inconsequential since a) a non-leap years century isn't going to be an issue for 95 years, b) DST doesn't start or end in February anywhere in the world and c) even if it did, it wouldn't start/end on a February 29. (Truth is, for practical purposes, it probably isn't even worth checking ever.)
(I'm not just making this up; I really did take all of the above into account when writing this code.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|