marquee-scroller icon indicating copy to clipboard operation
marquee-scroller copied to clipboard

Time not working in military time

Open finnie2006 opened this issue 2 years ago • 20 comments

I am from the netherlands and we use 24 hour clock, but its not working, as soon as i set the time to 24 hours the time is going to 12:00 midnight and not updating to the correct time, as soon as i set it to am pm time it displays the correct time

finnie2006 avatar Nov 11 '22 10:11 finnie2006

What version of the firmware are you running?

Qrome avatar Nov 11 '22 12:11 Qrome

3.01

finnie2006 avatar Nov 11 '22 12:11 finnie2006

Going to need more as I can't replicate it and most of the European users use the 24 hour clock.

Qrome avatar Nov 11 '22 17:11 Qrome

i had the same problem too.I change to AM/PM and it was working.Now after rebooting it still shows January 1 12:00 even with AM/PM ...

costascontis avatar Nov 18 '22 19:11 costascontis

Yea

finnie2006 avatar Nov 18 '22 19:11 finnie2006

Check that your time db api key is active and valid. I can't replicate this. https://timezonedb.com/register

Qrome avatar Nov 18 '22 23:11 Qrome

Make sure the timezonedb.com endpoint is accessible and not being blocked on your network. You can also connect to the Serial Monitor in the Arduino IDE and view the log as it attempts to get the time and find out what is going on there.

I am not able to replicate the issue.

Qrome avatar Nov 18 '22 23:11 Qrome

-edit- weather data returns just fine. tried another API key for time, same result: time is retrieved correct from timeserver, but clock starts at 12.00 1/1.

Same sort of issue over here (Netherlands). running v 3.01. after reboot clock starts at 12.00 date: thursday 1st of january. attached clock to serial monitor. correct time is retrieved from time server, but wrong date/time are displayed:

17:49:39.079 -> 17:49:39.079 -> Getting Weather Data 17:49:39.079 -> GET /data/2.5/group?id=2756987&units=metric&cnt=1&APPID=***** HTTP/1.1 17:49:39.126 -> Waiting for data 17:49:39.126 -> Response Header: HTTP/1.1 200 OK 17:49:39.126 -> lat: *** 17:49:39.126 -> lon: *** 17:49:39.126 -> dt: *** 17:49:39.126 -> city: *** 17:49:39.126 -> country: NL 17:49:39.126 -> temp: 0.31 17:49:39.126 -> humidity: 76 17:49:39.126 -> condition: Clouds 17:49:39.126 -> wind: 1.62 17:49:39.126 -> direction: 77 17:49:39.126 -> weatherId: 801 17:49:39.126 -> description: few clouds 17:49:39.126 -> icon: 02n 17:49:39.126 -> timezone: 1 17:49:39.126 -> 17:49:39.126 -> Updating Time... 17:49:39.126 -> essful! 17:49:39.126 -> Getting Time Data for **** 17:49:39.126 -> GET /v2.1/get-time-zone?key=&format=json&by=position&lat=&lng=* HTTP/1.1 17:49:39.544 -> Waiting for data 17:49:39.544 -> { 17:49:39.544 -> "status": "OK", 17:49:39.544 -> "message": "", 17:49:39.544 -> "countryCode": "NL", 17:49:39.591 -> "countryName": "Netherlands", 17:49:39.591 -> "regionName": "", 17:49:39.591 -> "cityName": "", 17:49:39.591 -> "zoneName": "Europe/Amsterdam", 17:49:39.591 -> "abbreviation": "CET", 17:49:39.591 -> ⸮ "gmtOffset": 3600, 17:49:39.591 -> "dst": "0", 17:49:39.591 -> "zoneStart": 1667091600, 17:49:39.591 -> "zoneEnd": 1679792400, 17:49:39.591 -> "nextAbbreviation": "CEST", 17:49:39.591 -> "timestamp": 1668880179, 17:49:39.591 -> "formatted": "2022-11-19 17:49:39" 17:49:39.591 -> } 17:49:39.591 -> 17:49:39.591 -> Time update unsuccessful! 17:49:39.591 -> Version: 3.01 17:49:39.591 -> 17:49:39.640 -> Displays: 4 17:49:39.687 -> **** 17:49:39.687 -> Clouds 17:49:39.687 -> few clouds 17:49:39.687 -> 0.3 17:49:39.687 -> Thursday, Jan 1, 12:01 AM 17:49:39.687 -> Signal Strength (RSSI): 56%

peterneuteboom avatar Nov 19 '22 16:11 peterneuteboom

Also Netherlands here

finnie2006 avatar Nov 19 '22 16:11 finnie2006

  1. Code didn't change
  2. I am not able to replicate it here in the US.

Is the service endpoint really getting a valid response for time there? EU has blocked news services and other things as well.

This is an open source project -- if someone that has the issue can literally debug or test some changes, that would be helpful.

Qrome avatar Nov 19 '22 17:11 Qrome

Not sure why but a lot of European cities do not work, i am using cityID 2759879 (Almere Netherlands), what i do is take the cityID from Paris to configure the time because that does work and set it back to my own city after time is updated. I tried, Berlin, Brussels, Amsterdam and none of those cityIDs work somehow. I tried 24h clock on and off, neither gives me any time update.

RetroCare avatar Nov 20 '22 09:11 RetroCare

There is a call that uses the latitude / longitude values to get the time zone. I am wondering if those values have changed in the response.

Qrome avatar Nov 20 '22 15:11 Qrome

I can confirm that 24H works for me, I live in Sweden. CityID=2698733

Kungsängen, SE, CityID=2698733 GET /v2.1/get-time-zone?key=XXXXXXXXXXXX&format=json&by=position&lat=59.4786&lng=17.7483 HTTP/1.1

Almere Stad, NL, CityID=2759879 GET /v2.1/get-time-zone?key=XXXXXXXXXXXX&format=json&by=position&lat=52.3703&lng=5.2141 HTTP/1.1

But from what I can see there is some parameters missing from your serial log, :

Getting Time Data for 52.3703,5.2141
GET /v2.1/get-time-zone?key=7ZN65IILOWPS&format=json&by=position&lat=52.3703&lng=5.2141 HTTP/1.1
Waiting for data
{
    "status": "OK",
    "message": "",
    "countryCode": "NL",
    "countryName": "Netherlands",
 -->   "regionName": "Flevoland",
 -->   "cityName": "Almere Stad",
    "zoneName": "Europe\/Amsterdam",
    "abbreviation": "CET",
    "gmtOffset": 3600,
    "dst": "0",
    "zoneStart": 1667091600,
    "zoneEnd": 1679792400,
    "nextAbbreviation": "CEST",
    "timestamp": 1669200835,
    "formatted": "2022-11-23 10:53:55"
}

And then you get an Time update unsuccessful! that I don't get!

mats-nk avatar Nov 23 '22 10:11 mats-nk

I noticed something, when i reset the clock will be 00:00 and can take from 5 minutes to an hour till it updates the time at this moment. Also i have tried waiting before and nothing happened and thats why i posted my response here. For now it looks like its working for me without issues but it used to update directly after a reboot without waining at all.

RetroCare avatar Nov 23 '22 11:11 RetroCare

@RetroCare: i can confirm that after a while the time is displayed correct (took up to 30 minutes).

peterneuteboom avatar Nov 25 '22 11:11 peterneuteboom

I can say now that after a reset (somehow my unit is freezing now and then :) ) it updates immediately now, maybe there was something on the API side of the service not related to the scroller because there was no change in that area of the code. also tested in AP/PM and military and both work as expected now.

RetroCare avatar Nov 25 '22 11:11 RetroCare

Any update?

finnie2006 avatar Dec 08 '22 20:12 finnie2006

I'm getting what I think is the same issue. The clock doesn't seem to be getting set:

Updating Time... essful!

Is the output from serial monitor.

FrankHovis avatar Nov 02 '23 15:11 FrankHovis

I want to update my experience with this (EU-The Netherlands), i still get 00:00 at startup of the clock, only when i wait a minute or 3-5 i refresh data from Web and it will fetch current time. eventually it wil sort itself out after a long wait and for quicker clock set i just wait 5 minutes and refresh my data.

RetroCare avatar Nov 02 '23 16:11 RetroCare

I am having the exact same issue

finnie2006 avatar Nov 05 '23 09:11 finnie2006