On Thu, Aug 17, 2023 at 10:06:14AM +0200, christoph.thiede@student.hpi.uni-potsdam.de wrote:
Thank you Dave! The follow-up questions:
- I noted that Chronology-Core-dtl.83 and Chronology-Core-dtl.84 are
still in the inbox. Should they be moved to trunk?
- Our list of timezones is very incomplete at the moment. Do you think
we should update the list?
I would suggest no, keep the list as small as possible for two reasons:
- There too many potential entries, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
- For many of the time zones, the UTC offset changes with daylight savings time changes, so you would probably need to define two of FixedTimeZone for each actual time zone.
I don't have an overview of the TZ-Olson package, would it be worth merging in the trunk?
I do not think that it needs to be in trunk. When I wrote the original version of TimeZoneDatabase (in 1999 I think), the date and time handling in Squeak was not very good. But nowadays we have better support in the VM, and the newer UTC-based DateAndTime in the image removes a lot of the earlier confusion. There are still things that can only be done with the TZ-Olson support, but the package is easy to load for those who have an interest.
Or could we just import the recent database once and generate an updated version of the constants in FixedTimeZone?
No, because the constants are not constant. The UTC offset is a function of the point in time, so you can't set it as a constant for the current time and then apply that constant to all other points in time.
I imagine that we could have a similar solution to Unicode class>>#initializeUnicodeData, so that in the end, a maintainer only has to rerun the database update once a while and we don't have additional dependencies in the image.
Yes, if the TZ-Olson database was being kept in the image, then it could be maintained in this way.
Overall, my best suggestion is to load the TZ-Olson package into a Squeak image running on Linux, and take a look at it. If you don't have Linux available let me know and I'll find a better way to get a copy of the database to you.
Dave
Best, Christoph
Sent from Squeak Inbox Talk
On 2023-07-08T15:54:15+00:00, commits@source.squeak.org wrote:
David T. Lewis uploaded a new version of Chronology-Core to project The Trunk: http://source.squeak.org/trunk/Chronology-Core-dtl.85.mcz
==================== Summary ====================
Name: Chronology-Core-dtl.85 Author: dtl Time: 1 July 2023, 9:01:03.976799 pm UUID: bdd66b0f-97e1-4fd5-bca6-4194eaf60096 Ancestors: Chronology-Core-mt.82
Establish protocol for aTimeZone offsetAt: aDateAndTime. Let TimeZone be abstract and let FixedTimeZone implement the previous behavior with offset represented as a constant (no DST transition support). Other packages (e.g. TZ-Olson) may implement concrete TimeZone with DST support.