Hippocampe
Hippocampe copied to clipboard
Unable to schedule hipposched - unable to determine the name of the local timezone
Request Type
Bug
Work Environment
Question | Answer |
---|---|
OS version (server) | RedHat |
OS version (client) | Seven |
Package Type | Docker |
Problem Description
Unable to schedule hipposched as specified in docs. Error 500.
Steps to Reproduce
- made a curl request as specified in docs:
curl -i -H "Content-Type: application/json" -X POST -d '{"time" : "* */12 * * *"}' "https://XXXX/hippocampe/api/v1.0/hipposched"
HTTP/1.0 500 INTERNAL SERVER ERROR
Content-Type: application/json
Content-Length: 287
Server: Werkzeug/0.14.1 Python/2.7.14
Date: Fri, 29 Jun 2018 08:10:21 GMT
Set-Cookie: XXXXXXXX; path=/; HttpOnly; Secure
Connection: keep-alive
{"error":"Unable to determine the name of the local timezone -- you must explicitly specify the name of the local timezone. Please refrain from using timezones like EST to prevent problems with daylight saving time. Instead, use a locale based timezone name (such as Europe/Helsinki)."}
- Get error:
Unable to determine the name of the local timezone
OS version (server) | Debian |
---|---|
OS version (client) | 9.5 |
Package Type | Docker |
I encountered the same error:
curl -i -H "Content-Type: application/json" -X POST -d '
{
"time" : "* */12 * * *"
}' http://127.0.0.1:5000/hippocampe/api/v1.0/hipposched
HTTP/1.0 500 INTERNAL SERVER ERROR
Content-Type: application/json
Content-Length: 287
Server: Werkzeug/0.14.1 Python/2.7.15
Date: Tue, 13 Nov 2018 10:12:33 GMT
{"error":"Unable to determine the name of the local timezone -- you must explicitly specify the name of the local timezone. Please refrain from using timezones like EST to prevent problems with daylight saving time. Instead, use a locale based timezone name (such as Europe/Helsinki)."}
You can add these to the file and it will allow you to set your time zone
import os
os.environ['TZ']= 'America/New_York'
@ndragon798 has the fix. By 'file', they mean core/services/hipposched.py