Gigalixir Deployment Timex Error

Application timex exited: exited in: Timex.start(:normal, [])
 web.1  |             (timex) lib/timex.ex:13: Timex.start/2
 web.1  |     ** (EXIT) an exception was raised:
 web.1  |             (elixir) Calendar.get_time_zone_database()
 web.1  |         ** (UndefinedFunctionError) function Calendar.get_time_zone_database/0 is undefined or private
 web.1  |             (kernel) application_master.erl:277: :application_master.start_it_old/4
 web.1  | Crash dump is being written to: erl_crash.dump...done
 web.1  | {"Kernel pid terminated",application_controller,"{application_start_failure,timex,{bad_return,{{'Elixir.Timex',start,[normal,[]]},{'EXIT',{undef,[{'Elixir.Calendar',get_time_zone_database,[],[]},{'Elixir.Timex',start,2,[{file,\"lib/timex.ex\"},{line,13}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,277}]}]}}}}}"}
 web.1  | Kernel pid terminated (application_controller) ({application_start_failure,timex,{bad_return,{{'Elixir.Timex',start,[normal,[]]},{'EXIT',{undef,[{'Elixir.Calendar',get_time_zone_database,[],[]},{'Elix

This error is causing the 503 Service Temporarily Unavailable on the Phoenix app I’m deploying using Gigalixir.

What version of Elixir are you using?

If it’s before Calendar was in the stdlib, that could be an issue. Either use a more recent version of Elixir (my choice), or an older version of Timex

Looks like that specific function was added in 1.8, Calendar — Elixir v1.11.4

Yes, I was using Elixir version 1.7. Upgraded to 1.11.4, and this issue was resolved.