joeshaw / carwings

Go package and CLI tool for the Nissan Leaf Carwings API
MIT License
31 stars 11 forks source link

Wrong stop time displayed in some circumstances #29

Closed karora closed 3 years ago

karora commented 4 years ago

Nissan is very confused about my timezone, so this sort of thing seems to happen in a few places.

In my Carwings configuration file I have my timezone set to "Europe/Dublin" but it's not being used when I request carwings climate:

{
  "status":200,
  "RemoteACRecords":{
    "OperationResult":"START",
    "OperationDateAndTime":"2019\/12\/16 18:09",
    "RemoteACOperation":"START",
    "ACStartStopDateAndTime":"2019\/12\/16 17:09",
    "CruisingRangeAcOn":"101016.0",
    "CruisingRangeAcOff":"104328.0",
    "ACStartStopURL":"",
    "PluginState":"CONNECTED",
    "ACDurationBatterySec":"900",
    "ACDurationPluggedSec":"7200"
  }
}

The output is:

Climate status:
  Running: yes
  Will stop at: 2019-12-16 20:09:00 +0100 CET
  Plug-in state: connected
  Cruising range: 104 km (101 km with AC)

But of course it will stop at 2019-12-16 19:09:00 +0000 Europe/Dublin

I'll try and work out a patch...

joeshaw commented 3 years ago

@karora Were you able to get this sorted out? Is there anything that needs to be done on our side?

karora commented 3 years ago

It's so long, and I started a new job today so I'm going to be snowed under for the foreseeable future. Let's just close it, and if it annoys me again in the future I'll re-open with a patch... :-)

joeshaw commented 3 years ago

Congrats on the new gig. Cheers!