Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tzdb::local_tz() function get None in linux, expect get Some value . #101

Closed
baoyachi opened this issue Aug 9, 2022 · 4 comments
Closed

Comments

@baoyachi
Copy link

baoyachi commented Aug 9, 2022

~ uname -a
~ Linux 3.10.x86_64 #1 SMP Wed Feb 23 16:47:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

~ timedatectl
      Local time: Tue 2022-08-09 17:46:20 CST
  Universal time: Tue 2022-08-09 09:46:20 UTC
        RTC time: Tue 2022-08-09 09:46:20
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: n/a
@baoyachi baoyachi changed the title tzdb::local_tz() function get error in linux tzdb::local_tz() function get None in linux, expect get Some value . Aug 9, 2022
@Kijewski
Copy link
Owner

Kijewski commented Aug 9, 2022

"Asia/Shanghai" is contained in the shipped database, so the problem probably lies with getting the timezone name: iana_time_zone::get_timezone()

Linux 3.10 is ancient, but it should still be supported. Which distribution do you use. Can you show be the output of lsb_release -a?

@baoyachi
Copy link
Author

"Asia/Shanghai" is contained in the shipped database, so the problem probably lies with getting the timezone name: iana_time_zone::get_timezone()

Linux 3.10 is ancient, but it should still be supported. Which distribution do you use. Can you show be the output of lsb_release -a?

~  lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.9.2009 (Core)
Release:	7.9.2009
Codename:	Core
~

@Kijewski
Copy link
Owner

Kijewski commented Aug 10, 2022

I could verify the problem on CentOS 7, and filed an issue at strawlab/iana-time-zone#47. Will work on it tomorrow if no one else does in the meantime. :)

strawlab/iana-time-zone#48

@Kijewski
Copy link
Owner

Kijewski commented Aug 10, 2022

Fixed in v0.4.1. Thank you for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants