Chronos is one of the many Smalltalk-related blogs syndicated on Planet Smalltalk
χρόνος

Discussion of the Essence# programming language, and related issues and technologies.

Blog Timezone: America/Los_Angeles [Winter: -0800 hhmm | Summer: -0700 hhmm] 
Your local time:  
Showing posts with label timezone repository. Show all posts
Showing posts with label timezone repository. Show all posts

2008-03-25

Version 2008b of the Chronos Time Zone Repository has been published

Version 2008b of the Chronos Time Zone Repository has been published. It is based on version 2008b of the Olson Time Zone Database.

Downloads:




2008-01-01

2007-12-13

2007-08-26

Chronos Time Zone Repository Version 2007g Published

Version 2007g of the Chronos Time Zone Repository has been published. It is based on version 2007g of the Olson Time Zone Database.

Downloads:




2007-04-02

Chronos Time Zone Repository Version 2007e Published

Version 2007e of the Chronos Time Zone Repository has been published. It is based on version 2007e of the Olson Time Zone Database.

Downloads:




2007-03-26

Chronos Time Zone Repository Version 2007d Published

Version 2007d of the Chronos Time Zone Repository has been published. It is based on version 2007d of the Olson Time Zone Database.

Downloads:




2007-02-13

Chronos Time Zone Repository Version 2007b Published

Version 2007b of the Chronos Time Zone Repository has been published. It is based on version 2007b of the Olson Time Zone Database.

Downloads:




Chronos Roadmap

Current Task: Implement iCal Recurrence Rules

Planned Tasks/Enhancements/Features:


  • Implement full support for "Business Day Conventions," including addition/subtraction of business days (supplementing the already-supported "business days between dates" functionality.) Business date conventions specify the business rule for adjusting dates so that they don't fall on holidays, such as "next business day," "preceding business day," "nearest business day, "next business day in same month--adjusting to previous business day if necessary," "previous business day in same month--adjusting to next business day if necessary"

  • Implement multiple timescales (e.g., UT0, UT1, UTC, TAI, apparent
    solar...) Will at least implement UT1 and UTC--but the architecture will be extensible.

  • Complete all documentation.

  • Implement the Chinese Calendar.

  • Implement the Astronomical Hijri (Islamic) Calendar.

  • Implement conformance to the IANA Time Zone Registry Specification




2007-01-11

2006-12-12

2006-09-18

Version 2006k of the Chronos Time Zone Repository has been published

Arthur David Olson has published version 2006k of the Olson Time Zone Database. Consequently, version 2006k of the Chronos Time Zone Repository has been published--both the Chronos-native and XML versions are available from date-time-zone.com.


2006-08-31

Version 2006j of the Chronos Time Zone Repository Published

Arthur David Olson published version 2006j of the Olson Time Zone Database. Consequently, version 2006j of the Chronos Time Zone Repository has been published--both the Chronos-native and XML versions are available from date-time-zone.com.


2006-05-01

Bug fixed; New Version of Time Zone Repository Published

Version 2006e of the Olson Time Zone Database has been published. Consquently, version 2006e of the Chronos Time Zone Repository has been generated by the Chronos Time Zone Compiler (from the Olson data,) and is now avaiable from the Chronos web site (download link: Chronos Time Zone Repository.)

Also, I found and fixed a bug that will be encountered if a) you're using a recent version of Chronos, and b) you haven't properly installed the Chronos Time Zone Repository. When the Chronos Time Zone Repository has not been properly installed, Chronos is supposed to complain, but not not present you with an exception traceback. The bug is that you are in fact presented with an exception traceback. The bug has been fixed in version B1.172, which is now avaiable from the Chronos web site.

If you'd prefer to fix the bug without installing a new version of Chronos, just change the source code of the method ChronosResourceRepositoryContext>>invalidateResourcePaths to the following text:


invalidateResourcePaths
"The resource paths may be invalid. Reinitialize them."

"{ChronosSystemFacade current resourceRepositoryContext invalidateResourcePaths}"

| oldResourcePathPrefix |
self resourcePathsExist ifTrue: [^true].
oldResourcePathPrefix := resourcePathPrefix.
^(self findValidResourcePathPrefix:
[:resourcePathPrefixString |
self resourcePathPrefix: resourcePathPrefixString])
ifTrue: [true]
ifFalse:
[resourcePathPrefix := oldResourcePathPrefix.
false]



2006-04-03

Version 2006c of the Chronos Time Zone Repository Published

Arthur David Olson published version 2006c of the Olson Time Zone Database today. Consequently, version 2006c of the Chronos Time Zone Repository has been published--both the Chronos-native and XML versions are available from date-time-zone.com.


2006-04-02

Chronos Version B1.160 Published: Time Zone Rulesets Over HTTP

Chronos Version B1.160 has been publised ("Beta Release 1--build 160".) Chronos B1.160 is available for both VisualWorks and Squeak. The Chronos Seed Archive for B1.160 is also available (the "Chronos Seed" is the platform-independent Chronos codebase, used for porting Chronos from VisualWorks to other Smalltalk pltatforms.)

Chronos Version B1.160 can be obtained from the Chronos Web Site. The VisualWorks version can also be obtained from the Cincom Public StORE Repository. Or you can use either the direct download link for VisualWorks or the direct download link for Squeak.

The Chronos Time Zone Repository is included in the download archive. Be sure to follow the Chronos Installation Instructions--especially if you have not already done so for a previous version of Chronos.

If you are reinstalling Chronos into an image in which an earlier version is already resident, and do not install the new version from the Cincom Public StORE Repository using StORE, it is necessary to first remove the earlier version. StORE has been able to correctly install the new version on top of every earlier version I have tried--but I haven't tried them all.

About Chronos Version B1.160


Chronos Version B1.160 is able to retrieve the ruleset of any Olson-defined time zone, on demand, over HTTP. As far as I have been able to determine, Chronos is the only date/time library in the world with such a capability. If that's so, then this is a significant "first" for Smalltalk, in my humble opinion.

However, by default Chronos version B1.160 does not attempt to retrieve time zone rulesets over HTTP, for three reasons:

1. It is wise to avoid relying on new code when there is no clear need to do so.

2. The local filesystem probably has a higher availability than a remote HTTP server would have. To put it in "enterprise speak" (heh,) the local filesystem can probably be expected to meet a more demanding SLA.

3. Retrieving time zone rulesets over HTTP is significantly slower than from the local filesystem. This is hardly noticeable in the case of a single time zone, but becomes noticeable even when retrieving as few as five zone rulesets (according to my tests using a 4Mbit/second broadband connection.)

In spite of the above caveats, there are definitely cases where it makes great sense to retrieve time zone rulesets from a time zone server over HTTP, and not from the local filesystem. The same goes for a lot of other common reference data, such as locale information, holiday rules, the UTC leap second schedule, the current and/or historical prices of stocks, currencies and commodities, the dictionary definitions of words, help text, and numerous other examples.

The reasons for obtaining reference data over HTTP from a well-known, canonical source, in spite of the above concerns, are several:

1. Although reference data is usually relatively static, that's not always the case. It does change--and keeping all users up to date with the latest reference data can be quite a challenge for software vendors/distributors.

2. If reference data is kept locally, then the local application must manage it. That includes keeping track of of its location in the user's filesystem. Such information can and does get lost.

3. If each application is separately responsible for managing reference data, then not only does that involve a lot of duplicated effort on the part of the world's software vendors/distributors, it also puts the user at risk of getting different answers to the same questions from different applications. In other words, it presents a "reference data integrity" issue.

4. Reference data can usually be obtained without the need of CGI, servlets, EJBs, SOAP or "Web Services." More often than not, a RESTian architecture is quite sufficent. The Chronos architecture for reference data retrieval over HTTP is RESTian--an HTTP server is all that's needed.

5. Ajax applications typically don't have access to the local filesystem.

To configure Chronos so that it will retrieve time zone rulesets over HTTP from the default Chronos time zone server, evaluate the following "do it":

ChronosSystemFacade current resourcePathPrefix: 'http:///'


The above "do it" answers either true or false. If it answers false, then Chronos was not able to verify that the Chronos Time Zone Repository was accessible from the default Chronos time zone rule server, and the image will continue to use the local time zone repository. If it answers true, then the image will satisfy all future requests for a time zone ruleset from the Chronos time zone server over HTTP, until either a) it is told to use the local filesystem, or b) it is unable to connect to the time zone server on image startup.

To instruct Chronos to stop using the Chronos time zone server over HTTP to access the Chronos Time Zone Repository, and to instead access the time zone repository on the local filesystem at a specified path, evaluate a "do it" such as one of the following examples:

ChronosSystemFacade current resourcePathPrefix: nil.
"The first example makes Chronos look in the
current directory for the TZ repository"

ChronosSystemFacade current resourcePathPrefix: '/usr/local/reference/'.

ChronosSystemFacade current resourcePathPrefix:
'C:\Documents and Settings\shibumi\My Documents\Squeak\Chronos'.


You can also ask Chronos to search for the time zone repository at various likely locations (as documented in the Chronos installation instructions) by evaluating the following "do it":

ChronosSystemFacade current resourceRepositoryContext invalidateResourcePaths


The #invalidateResourcePaths operation can be quite useful in VisualWorks, but much less so in Squeak. The VW infrastructure provides the basis for a rather sophisticated approach to finding a resource using a dynamically-determined "search path," compared to what can be easily implemented in Squeak. For this reason, I expect most Squeak users will simply keep the time zone repository in the same directory as their image file.

I would also note that the Chronos infrastructure for managing/accessing reference data had to be drastically refactored/redesigned in order to support this new functionality. One consequence of the refactoring/redesign is that a lot of the inter-Smalltalk "platform portability" code used by Chronos has been factored out into its own modules that are completely independent of the rest of Chronos.

I'll have much more to say about Chronos' "inter-Smalltalk portability" modules in the future. I have a suspicion that those modules might be of great interest to certain people who need to maintain versions of their applications on multiple Smalltalk platforms--Squeak, VisualWorks and Dophin, for example.

I'll also be providing full documentation of the Chronos reference data framework, including how to use it for your own reference data (whether or not you need or use Chronos date/time functionality.) But for now, you'll just have to wait.

In fact, it may be some time before there are any new versions of Chronos published. I have other matters to which I must attend--and I need a vacation. But I will continue to write blog entries.

--Alan



2006-03-22

Chronos Time Zone Repository in XML

An XML-encoded version of the Chronos Time Zone Repository is now available from date-time-zone.com. The XML schema is defined by an annotated XSD. The information in the Chronos Time Zone Repository is produced by the Chronos Time Zone Compiler using the Olson Time Zone Database zoneinfo source files.

The Olson Time Zone Database defines the rulesets of over 400 time zones, each identified by a unique key. The rule model of the Chronos Time Zone Repository is based on that of the Olson zoneinfo source files, but extends it with the ability to specify the calendar in which the date of each zone offset transition is specified (currently, the calendar is always the Gregorian calendar, but that may change in the future, since some countries use other calendars to specify annually-recurring zone offset transition dates.)

The Chronos Time Zone Repository also provides the geographic coordinates of the city whose name identifies the time zone (if there is one,) and a default (English) name for about 75 of the most commonly used time zones (based on the name used by Windows.)

The date-time-zone.com site provides links to download the XML version of the Chronos Time Zone Repository (download link: XML version of the Chronos Time Zone Repository) and also the "native to Chronos" version of the Chronos Time Zone Repository (dowload link: native-to-Chronos version of the Chronos Time Zone Repository.)

Chronos itself uses only its own proprietary version of the time zone repository, which is not encoded as XML. The XML-encoded version is intended for the general use of other applications and libraries.

The main advantages of the Chronos Time Zone Repository over other distributions of time zone repositories based on the Olson data are that a) the Chronos rule model preserves the original transition ruleforms based on annually-recurring dates (and the date and time of zone offset transitions is specified in a way that is independent of issues such as leap days and leap seconds,) b) the Chronos ruleset files contain all the information for each time zone--there is no need to cross reference with information from other files, nor to deal with the complex rule macros used in Olson's zoneinfo source files, c) it's available in XML, with syntax governed by a fully-annotated XSD, and d) there's a machine-consumable Atom feed for the announcement of new versions.

Olson publishes a new version of the time zone data about once a month. When that happens, the Chronos Time Zone Compiler is used to generate a new version of the Chronos Time Respository from the new Olson zoneinfo source files, a new version of the Chronos XML Time Zone Repository is then generated, and finally the Atom feed is updated to announce the new version.


2006-02-24

Version 2006b of the Chronos Time Zone Repository Published

Arthur David Olson has published version 2006b of the Olson Time Zone Database. Consequently, version 2006b of the Chronos Time Zone Repository has been generated from the new version of the Olson TZDB, and is available from the Chronos web site.


2006-02-03

Why Can’t The Windows Registry Timezones be used?

A poster with the handle iwonder started a thread on the ASP.net forum, titled On Time Zones and Daylight Saving Time (Summer Time).. (I've added the whole thread to the "Cautionary Tales" section of the Chronos web site.) In a subsequent post to the thread, he has a subsection titled "Why Can’t The Windows Registry Timezones be used?", where he states:


First, and foremost the 75 windows registry timezones only are setup to support current year. Meaning that there is no historical reference. In fact, when a given locale changes their time zone daylight saving (summer time) rules, these rules need to be manually ‘fixed’ in the registry. These types of corrections are not distributed by Microsoft as updates to anyone. The corrections appear in KB articles, but the corrections could easily be missed by folks that are not in the locale affected. As each year starts, new rules are in place, which may not calculate the correct date time adjustments for any past years. Actually, any date time adjustment based on the registry alone results in a date time factored with the current years’ rules. Not exactly the result time sensitive sites would require.

Secondly, the windows registry is not totally accurate. Independent tests show it to be around 75-80% accurate at any point in time. Also, the time zones do not represent every time zone on the globe, just the more commonly used zones are included. The UNIX / Linux TZInfo database includes many more time zone descriptions, but there is a question of just how many require support. Obviously, MS made the determination that only 75 of the more than 108 zones in the TZInfo database really require support. It’s a question of judgement.

Lastly, web applications are not really meant to have access to the windows registry. It’s really a question of security, but I can’t imagine any host provider wanting to allow a web application to manipulate the registry. In fact, I’m not sure if the Code Access Security model will even allow the type of registry read and write permission required to effectively use and maintain a registry timezone information.

Correct answers in date/time computations are just as important as correct answers in issuing payroll checks, crediting interest earned, sending out invoices, computing work schedules, sheduling airline flights, administering the right medications to the right patients at the right time, getting a spaceship, rocket or missile to its intended destination at the right time, or even just dividing one number by another.

When I hear people say otherwise, there's no doubt in my mind that what I'm really hearing is an emotional reaction against the unwanted complexity of the date/time domain. But neither reality nor complexity goes away just because you wish things were otherwise.

Time is complex. Deal with it. The Universe doesn't care about your preferences, and will happily bite you in a private part of your anatomy if you can't bring yourself to accept and handle the world as it is.


2006-02-02

Discovering the Local Time Zone--Why It's a Hard Problem

I've written a rather long essay that explores all the issues involved in having VisualWorks (and Squeak) synch up with the host operating system's time zone offset rules. It's too long for the blog, so here's the first 3 paragraphs, followed by a link to the full essay:

Smalltalk-80 was released to the world in 1983. I no longer remember exactly when, but well before 1990, ParcPlace systems (the company formed by Xerox to commercialize Smalltalk) introduced a Time Zone class (which had not been in the version given to Tektronix, HP, TI and Apple in 1980--which is why Squeak Smalltalk, which descends from the version Xerox gave Apple, didn't have a Time Zone class until just recently.) It's been roughly 20 years since Smalltalk first had a Time Zone class--well before any other language that I know of had one. And yet both VisualWorks and Squeak, the two modern descendants of Smalltalk-80, still can't configure their Time Zone objects so that the offset transition rules match those of the host operating system (although Squeak dodges the issue by having the VM report clock ticks in local time, an approach that gives the strong but deceptive illusion of "working" as long as one only ever deals with one time zone, and doesn't care about correct time computations into the past or the future.)

Why does this situation persist? Why doesn't Cincom (current ownwers of VisualWorks, which descends from the original ST-80 marketed by ParcPlace) just write a few lines of code so that when VisualWorks first starts up, it finds out what time zone it's in from the host operating environment? Why don't the Squeak folks do likewise? Is this a hard problem or something?

Well, yes. It is. Here's the story, in all its sordid details: Discovering the Local Time Zone--Why It's a Hard Problem.


2006-01-31

Version 2006a of the Chronos Time Zone Repository Published

Version 2006a of the Olson Time Zone Database has been published, and so version 2006a of the Chronos Time Zone Repository has been generated and published. It's available from the Chronos Web Site.

Direct download link: http://chronos-st.org/images/time-zones.zip.