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

Timestamp returned from Hourlly Forecast in strange format #31

Closed
elcioabrahao opened this issue Sep 10, 2015 · 1 comment
Closed

Timestamp returned from Hourlly Forecast in strange format #31

elcioabrahao opened this issue Sep 10, 2015 · 1 comment

Comments

@elcioabrahao
Copy link

Hi there !
I'm using the weatherlib with onpenweathermap provider and when I get the hourly forecast the timestamp is returned on a strange format:

timestamp: 1441897200
temp: 19.61
timestamp: 1441908000
temp: 16.75
timestamp: 1441918800
temp: 13.8

The convertion to Date format came with a date on Febuary, 1970.... so I believe that this format is not the regular timestamp long from January, 1st, 1970...

I can see a sequence in the middle of the number: 189, 190, 191... but I could not find a logic to find a reference to a valid time value.

Could you help me ?

Thanks,

Elcio A.

@elcioabrahao
Copy link
Author

Solved, timestamp = secods from 01/01/1970, just * 1000 and get the miliseconds timestamp. Thanks !

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

No branches or pull requests

1 participant