Hippocampe icon indicating copy to clipboard operation
Hippocampe copied to clipboard

Unable to schedule hipposched - unable to determine the name of the local timezone

Open mnmnc opened this issue 6 years ago • 3 comments

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

  1. 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)."} 
  1. Get error: Unable to determine the name of the local timezone

mnmnc avatar Jun 29 '18 08:06 mnmnc

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

remiallain avatar Nov 13 '18 10:11 remiallain

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 avatar Oct 16 '19 23:10 ndragon798

@ndragon798 has the fix. By 'file', they mean core/services/hipposched.py

MachLearnPort avatar Jul 07 '20 02:07 MachLearnPort