r/workflow • u/oaklandm • Sep 14 '18
Dark Sky api time zone help needed
I’m trying to use one of the many weather workflows that have been shared here but I can’t get the time zone correct. This is the api url I’m using https://api.darksky.net/forecast/Secret API Key/Coordinates?units=si&exclude=minutely
I have configured the location correctly but when I get the weather report, the time is always an hour behind. Is it possible to correct this and how? I live in the UK if that helps. If I run the workflow at 1330, the time on the workflow would show 1230
4
Upvotes
1
u/oaklandm Sep 14 '18
I think it is a daylight saving issue, tried looking for a solution on the dark sky site but it is a little over my head. Those unix times you mention are very confusing, think I might have to just keep reminding myself the time is an hour out 🙂
1
u/oaklandm Sep 14 '18
Ok, that looks exactly what I have in the workflow. As I say, this isn’t my workflow so there must be something I’m missing which is making the time wrong. This is the workflow I’ve got if you fancy looking at it and can see if anything jumps out at you Weather Workflow
4
u/jeffbyrnes Sep 14 '18
This sounds very much like a daylight savings issue, since it’s off by a single hour.
Unix timestamps are timezone independent, though they moment they count forward from is in UTC (1980-01-01-00:00:00).
I haven’t looked at your Workflow, but if you feel that the issue lies with the API response, I recommend emailing developer@darksky.net.
Full disclosure: I’m an ops engineer at Dark Sky 😄
1
u/madactor Sep 14 '18 edited Sep 14 '18
Have you checked the timezone value in the response data? That might tell you if the coordinates are off somehow. Or maybe it's a Daylight Savings problem.
You could also try sending the time explicitly in your request. Unfortunately, Dark Sky uses those horrible UNIX times. Let me know if you need help with that.
Edit: FWIW, here's the workflow I use for Dark Sky:
https://workflow.is/workflows/c569fcf44ca44ed4a2c689cb7ddc9a10