Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

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

Open
mnmnc opened this issue Jun 29, 2018 · 3 comments

Comments

@mnmnc
Copy link

mnmnc commented Jun 29, 2018

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 mnmnc closed this as completed Jun 29, 2018
@mnmnc mnmnc reopened this Jun 29, 2018
@remiallain
Copy link

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

@ndragon798
Copy link

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'

@MachLearnPort
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants