Django app crashes on deployment
zoro125
HOBBYOP

a year ago

Django app deployment fails with the error message below:

ValueError: Incorrect timezone setting: Canada/Pacific

I didn't have this problem before (last time I updated the code about 1 week ago and it deployed successfully). I've tried reverting the code a few times and different branches without any success. I'd really appreciate any help.

(is there way to upload full log file here?)

Solved$10 Bounty

Pinned Solution

a year ago

A recent Django version tightened validation on time zones. It now strictly checks against the IANA time zone database. Canada/Pacific is an alias of its new name, not sure if that would impact Django in this case but its worth a shot if its a sudden issue. Try to replace Canada/Pacific with the proper IANA name, America/Vancouver.

5 Replies

zoro125
HOBBYOP

a year ago


zoro125
HOBBYOP

a year ago

It seems that setting TIME_ZONE in settings.py causes this problem. It wasn't a problem before so I don't know why all of the sudden. Anyway, does anybody know any solution to this? The solution I linked above doesn't work in my local environment (Windows).


chandrika
EMPLOYEE

a year ago

Hey there, glad you found a lead on this!

As it's an application level issue, Railway is unable help — we focus on helping out with platform level issues only due to the high volume of questions we get.

Leaving this open so folks from the community may chime in!


Status changed to Awaiting User Response Railway about 1 year ago


zoro125

It seems that setting TIME\_ZONE in [settings.py](http://settings.py) causes this problem. It wasn't a problem before so I don't know why all of the sudden. Anyway, does anybody know any solution to this? The solution I linked above doesn't work in my local environment (Windows).

a year ago

A recent Django version tightened validation on time zones. It now strictly checks against the IANA time zone database. Canada/Pacific is an alias of its new name, not sure if that would impact Django in this case but its worth a shot if its a sudden issue. Try to replace Canada/Pacific with the proper IANA name, America/Vancouver.


jack

A recent Django version tightened validation on time zones. It now strictly checks against the [IANA time zone database](https://en.wikipedia.org/wiki/List%5Fof%5Ftz%5Fdatabase%5Ftime%5Fzones). `Canada/Pacific` is an alias of its new name, not sure if that would impact Django in this case but its worth a shot if its a sudden issue. Try to replace `Canada/Pacific` with the proper IANA name, `America/Vancouver`.

zoro125
HOBBYOP

a year ago

Your suggestion fixed the issue. Thank you so much!


Status changed to Solved brody about 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...