You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This list used to include Asia/Kuala_Lumpur, but this is now missing from all_country_zones.
I don't have the tzinfo-data gem installed, so I believe tzinfo is getting these timezones from the filesystem. I checked the /usr/share/zoneinfo/Asia/ directory in my container, and Kuala_Lumpur is still present in there.
It looks like Malaysia only has the Asia/Kuching and Asia/Singapore timezones, and is missing Asia/Kuala_Lumpur. I also noticed that Cambodia only returns Asia/Bangkok, so Asia/Phnom_Penh is also missing.
The text was updated successfully, but these errors were encountered:
When not using tzinfo-data, the data related to time zones of a country (as returned by Timezone#all_country_zones and Country#zones) is taken from the zone1970.tab file in the zoneinfo directory (or zone.tab if zone1970.tab is not found). tzinfo-data also includes data from the same file supplied in IANA Time Zone Database releases.
The contents of the /usr/share/zoneinfo directory on Debian are supplied by the tzdata package. The latest version for Debian 11 is currently 2024a-0+deb11u1. The zone1970.tab file in that version lists the following time zones for Malaysia (country code MY) and Cambodia (KH):
#country-codes coordinates TZ comments
MY,BN +0133+11020 Asia/Kuching Sabah, Sarawak
SG,MY +0117+10351 Asia/Singapore peninsular Malaysia
TH,CX,KH,LA,VN +1345+10031 Asia/Bangkok north Vietnam
This matches the tzinfo output. Debian's zone1970.tab file is also identical to that included in the (currently latest) 2024a release of the IANA Time Zone Database.
The database considers the Asia/Kuala_Lumpur time zone to be identical to Asia/Singapore and Asia/Phnom_Penh to be identical to Asia/Bangkok. The Asia/Kuala_Lumpur and Asia/Phnom_Penh names are included for backwards compatibility. The zone1970.tab file only lists the canonical names.
Note that time zone names are not intended for use by end users. The Time Zone Database documentation includes an explanation of the naming theory.
I recently rebuilt my Debian Docker images using the latest release of 11 (bullseye):
I have some Ruby code that calls:
This list used to include
Asia/Kuala_Lumpur
, but this is now missing fromall_country_zones
.I don't have the
tzinfo-data
gem installed, so I believe tzinfo is getting these timezones from the filesystem. I checked the/usr/share/zoneinfo/Asia/
directory in my container, and Kuala_Lumpur is still present in there.But when I run this:
The output is missing Kuala_Lumpur, and probably a few others that I haven't noticed. Although most of the timezones still seem to be present:
I looked at the
#all_country_zones
method: https://github.com/tzinfo/tzinfo/blob/5fc278676efde3c85a788fa85ddabddcd91b846f/lib/tzinfo/timezone.rb#L206C7-L208C10So I ran another experiment based on the code in that method:
It looks like Malaysia only has the
Asia/Kuching
andAsia/Singapore
timezones, and is missingAsia/Kuala_Lumpur
. I also noticed that Cambodia only returnsAsia/Bangkok
, soAsia/Phnom_Penh
is also missing.The text was updated successfully, but these errors were encountered: