refactor: Replace 'PRC' timezone with 'Asia/Shanghai' for Debian 13+ compatibility - #58
Open
jeffwudev wants to merge 1 commit into
Open
refactor: Replace 'PRC' timezone with 'Asia/Shanghai' for Debian 13+ compatibility#58jeffwudev wants to merge 1 commit into
jeffwudev wants to merge 1 commit into
Conversation
…ompatibility - Update default timezone parameter in makeDate() from 'PRC' to 'Asia/Shanghai' - The 'PRC' timezone identifier has been removed from default timezone database in Debian 13 - Using 'PRC' timezone now requires installing additional tzdata-legacy package - 'Asia/Shanghai' is the IANA standard timezone identifier and provides better long-term compatibility - Both timezone identifiers represent the same UTC+8 timezone but 'Asia/Shanghai' is more standardized This change ensures the library works out-of-the-box on Debian 13+ systems without requiring additional package installations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the deprecated 'PRC' timezone identifier with the IANA standard 'Asia/Shanghai' timezone identifier to ensure compatibility with Debian 13 and future Linux distributions.
Changes
$timezoneparameter inmakeDate()method from'PRC'to'Asia/Shanghai'Motivation
Starting with Debian 13, the 'PRC' timezone identifier has been removed from the default timezone database (
tzdatapackage). To continue using the 'PRC' timezone on Debian 13+, users would need to install an additional package:This creates an unnecessary dependency and potential compatibility issues for users running the library on modern Debian-based systems.
Technical Details
Benefits
Testing
The change has been tested and confirmed to work correctly with the existing test suite. Both timezone identifiers represent the same UTC offset and DST rules.