gong yu
2023-Jan-06 04:24 UTC
[Rd] patch about timezone name of China Standard Time on windows
Last week ,I report a issuse about timezone name about" China Standard Time", R on windows will report to Asia/Taipei , but it should be Asia/Shanghai, Since still now no feedback (maybe because for my poor english). So resubmit a patch about this . Change it from Asia/Taipei to Asia/Shanghai could veryfied from 1 tzutil (this is windows buildin command made by microsoft ) , run tzutil /l , it show " China Standard Time" is (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi (AKA Asia/Shanghai on linux)? and furthermore , tzutil /l also report Taipei Standard Time (Asia/Taipei) , so Sys.timezone() report " China Standard Time" to Asia/Taipei indeed uncorrect. 2 timezone and their definition on window could found on microsoft website https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-10 in this document , it also show " China Standard Time" is (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi (AKA Asia/Shanghai on linux) , 3 also in unicode org web , the lastest document about time also support this patch https://unicode-org.github.io/cldr-staging/charts/42/supplemental/zone_tzid.html China Standard Time Asia/Shanghai and in current R implemention , it report " China Standard Time" is incorrect ,but "Taipei Standard Time" is correct, so this patch only need modify " China Standard Time" and will not affect other timezone. please feel free to share your thoughts or feedbacks of this patch Index: src/extra/tzone/registryTZ.c ==================================================================--- src/extra/tzone/registryTZ.c????(revision 83566) +++ src/extra/tzone/registryTZ.c????(working copy) @@ -51,7 +51,7 @@ { L"Central Pacific Standard Time", "Pacific/Guadalcanal" }, { L"Central Standard Time", "America/Chicago" }, { L"Central Standard Time (Mexico)", "America/Mexico_City" }, - { L"China Standard Time", "Asia/Taipei" }, + { L"China Standard Time", "Asia/Shanghai" }, { L"Dateline Standard Time", "Pacific/Kwajalein" }, { L"E. Africa Standard Time", "Africa/Nairobi" }, { L"E. Australia Standard Time", "Australia/Brisbane" }, Yu Gong
Ivan Krylov
2023-Jan-06 07:26 UTC
[Rd] patch about timezone name of China Standard Time on windows
Hello Yu Gong! I'm not an R developer, but I hope I'll be able to help you with my advice. On Fri, 6 Jan 2023 04:24:43 +0000 gong yu <yugong at outlook.com> wrote:> Last week ,I report a issuse about timezone name about" China > Standard Time", R on windows will report to Asia/Taipei , but it > should be Asia/Shanghai, Since still now no feedback (maybe because > for my poor english). So resubmit a patch about this .Sometimes, everyone is too busy to discuss a patch right now, but a patch just left on R-devel may be eventually forgotten before there's time for discussion. Try asking for a Bugzilla account (by following the guide at <https://www.r-project.org/bugs.html>) and submitting the patch there.> and in current R implemention , it report " China Standard Time" is > incorrect ,but "Taipei Standard Time" is correct, so this patch only > need modify " China Standard Time" and will not affect other timezone.Thank you for verifying this. As far as I can tell, the file has always contained both entries referring to "Asia/Taipei": https://github.com/r-devel/r-svn/blame/22bf3a2cb1dd6844e69c9214d990bf438a485db7/src/extra/tzone/registryTZ.c -- Best regards, Ivan