Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parseDate must specify right timezone #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

svera
Copy link

@svera svera commented Sep 3, 2018

Alpha Vantage times are in US/Eastern timezone. time.Parse() consider times to be in UTC, so time.ParseInLocation() must be used instead.

Check https://golang.org/pkg/time/#ParseInLocation for more information.

@svera
Copy link
Author

svera commented Sep 3, 2018

In order to make this future proof, right solution would be to get the timezone data from result metadata, which comes in this format:

"Meta Data": {
        "1. Information": "Intraday (5min) open, high, low, close prices and volume",
        "2. Symbol": "MSFT",
        "3. Last Refreshed": "2018-08-31 15:55:00",
        "4. Interval": "5min",
        "5. Output Size": "Compact",
        "6. Time Zone": "US/Eastern"
    },
...

but as code is currently getting information using CSV format this is not available.

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

Successfully merging this pull request may close these issues.

1 participant