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

"lastupdated" does not use localtime . #1327

Closed
MattL0 opened this issue Mar 6, 2019 · 2 comments
Closed

"lastupdated" does not use localtime . #1327

MattL0 opened this issue Mar 6, 2019 · 2 comments

Comments

@MattL0
Copy link

MattL0 commented Mar 6, 2019

After a get request via postman to MY_IP:port/api/apikey/sensors

i get this :

        "name": "hue bedroom motion",
        "state": {
            "dark": true,
            "daylight": false,
            "lastupdated": "2019-03-06T08:46:04",
            "lightlevel": 0,
            "lux": 0
        },
        "swversion": "6.1.0.18912",
        "type": "ZHALightLevel",

Here is what i get after : MY_IP:port/api/apikey/config

{
    "UTC": "2019-03-06T08:59:22",



    },

    "localtime": "2019-03-06T03:59:22",





    },
    "timeformat": "24h",
    "timezone": "America/Montreal",

}

    

why "lastupdated" does not use "localtime" ?

Does "lastupdated" use "UTC" for it's value?

@heitec11
Copy link

heitec11 commented Mar 7, 2019

I am also wundering about the Timeformat.
My different is only one hour, but also not the correct local time.
"UTC": "2019-03-07T14:04:03",
"timeformat": "24h",
"timezone": "Etc/GMT-1",
"localtime": "2019-03-07T15:04:03",
The Phoscon App is showing the correct time.
The API is showing the UTC time.

@ebaauw
Copy link
Collaborator

ebaauw commented Mar 7, 2019

The API uses UTC for all time fields. It's up to the app (i.c. Phoscon) to translate this into local time.

The obvious exceptions are /config/localtime and the localtime of a schedule.

@MattL0 MattL0 closed this as completed Mar 12, 2019
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

3 participants