Giter VIP home page Giter VIP logo

Comments (8)

mathieuprog avatar mathieuprog commented on September 26, 2024

I actually have no experience with builds. What about config/runtime.exs?

from tz.

lud avatar lud commented on September 26, 2024

That won't work because your have the following code directly in the module body:

@custom_data_dir Application.get_env(:tz, :data_dir)

So it is evaluated when the library is compiled, not when runtime is launched.

from tz.

mathieuprog avatar mathieuprog commented on September 26, 2024

What about changing that line to

defp custom_data_dir() do
  Application.get_env(:tz, :data_dir)
end

from tz.

lud avatar lud commented on September 26, 2024

Yep sure, that would work.

from tz.

mathieuprog avatar mathieuprog commented on September 26, 2024

Can you try it out and check if your deployments work with different config? And send a PR?
Or are you certain this will just do?

from tz.

lud avatar lud commented on September 26, 2024

Sorry we switched to tzdata when we faced that problem, I have currently no app using tz.

from tz.

mathieuprog avatar mathieuprog commented on September 26, 2024

This has been added in version 0.21.1.

Note that tzdata has bugs, sometimes may return wrong times or raise errors. That's why I created this library in the first place, I would never have spent months writing it otherwise.

Only tz and time_zone_info output correct times.

from tz.

lud avatar lud commented on September 26, 2024

Hi,

Yes I know, that is why we used tz and I raised this issue but we needed to configure the custom dir at runtime to work well with our docker deployment. That was for CRON-like jobs, just dealing with 2022+ dates.

I'll try again tz on a future iteration but I honestly don't know when I will work on this project again.

from tz.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.