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

Looks like date.h does not work with Ubuntu's system TZ DB (Build Manual_TZ_DB=ON + install string = "/usr/share/zoneinfo" on Ubuntu) #857

Open
nirvikalpa7 opened this issue Nov 18, 2024 · 2 comments

Comments

@nirvikalpa7
Copy link

Hi guys! I tried to use Ubuntu system TZ DB for an app on date.h (built without curl support - Manual_TZ_DB=ON)
But after start my simple app I see a coredump and error message "Can not find version for TZ DB"
I tried to copy the version file from downloaded IANA TZ DB to Linux path: "/usr/share/zoneinfo"
but after that I had a coredump anyway with an error message: Can not find TimeZone - America/New_York (my app uses it just as an example).

So the question: Can we use somehow system Ubuntu's TZ DB instead of downloading TZ DB from IANA web site? or are they incompatible? Thank you for your time and reply anyway.

2024-11-18_19-38-35
2024-11-18_19-40-28

@nirvikalpa7 nirvikalpa7 changed the title An app does not work on date.h (Build Manual_TZ_DB=ON + install config string = "/usr/share/zoneinfo" on Ubuntu 22/24) Looks like date.h does not work with Ubuntu's system TZ DB (Build Manual_TZ_DB=ON + install string = "/usr/share/zoneinfo" on Ubuntu) Nov 19, 2024
@nirvikalpa7
Copy link
Author

nirvikalpa7 commented Nov 19, 2024

Probably I should use USE_SYSTEM_TZ_DB option for build? It must help?

@HowardHinnant
Copy link
Owner

If you have gcc-14 and C++20 available, using std::chrono should be your first choice. Otherwise I do not recommend using CMake unless you are an expert at it.

Here are the recommended build instructions: https://howardhinnant.github.io/date/tz.html#Installation

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