Django app crashes on deployment
zoro125
HOBBYOP

9 months 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

jack
PRO

9 months 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

9 months ago


zoro125
HOBBYOP

9 months 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

9 months 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 9 months ago


zoro125

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).

jack
PRO

9 months 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. 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

9 months ago

Your suggestion fixed the issue. Thank you so much!


Status changed to Solved brody 9 months ago


Loading...