HowardHinnant / date

A date and time library based on the C++11/14/17 <chrono> header
Other
3.08k stars 669 forks source link

How to change the default directory for timezone database #745

Closed Yukinarii closed 1 year ago

Yukinarii commented 1 year ago

Hi, Im trying to use this library to convert timestamps between timezones. I noticed that the document is a little outdated, and some cmake options do not work anymore. I would like to setup the default download_dir to a directory other than ~/Downloads, but seems like there is no way to set it up through cmake. I found there is set_install that allow people to set the directory but I can't find an example on how to use it.

Would it be possible for me to get an example on how to setup the default download & install directory for the timezone database?

Thank you!

HowardHinnant commented 1 year ago

Hi,

Sorry about the CMake issues. I let others put that in against my better judgement.

Here are the installation instructions I recommend: https://howardhinnant.github.io/date/tz.html#Installation

Yukinarii commented 1 year ago

Hi, Thank you so much for the quick response. I figured it out after reading the code. It turns out that we just need to use set_install to specify the path originally set by -DINSTALL. Hope what I did is correct.