Api für datum?
Ich bin auf der Suche nach einer api die ich in meinem c++ Programm mit curl benutzen kann.. ich habe schon ein paar getestet aber ich bekomme sie nicht wirklich zum laufen
Das ist was ich probiert habe inklusive Fehler:
Trying API: http://worldclockapi.com/api/json/utc/now
API: http://worldclockapi.com/api/json/utc/now, Retry 1 failed, CURLcode: 28
API: http://worldclockapi.com/api/json/utc/now, Retry 2 failed, CURLcode: 28
API: http://worldclockapi.com/api/json/utc/now, Retry 3 failed, CURLcode: 28
API: http://worldclockapi.com/api/json/utc/now, Error fetching date, CURLcode: 28
Trying API: http://date.jsontest.com
API: http://date.jsontest.com, Retry 1 failed, CURLcode: 6
API: http://date.jsontest.com, Retry 2 failed, CURLcode: 6
API: http://date.jsontest.com, Retry 3 failed, CURLcode: 6
API: http://date.jsontest.com, Error fetching date, CURLcode: 6
Trying API: http://worldtimeapi.org/api/timezone/UTC
API: http://worldtimeapi.org/api/timezone/UTC, Retry 1 failed, CURLcode: 52
API: http://worldtimeapi.org/api/timezone/UTC, Retry 2 failed, CURLcode: 52
API: http://worldtimeapi.org/api/timezone/UTC, Retry 3 failed, CURLcode: 52
API: http://worldtimeapi.org/api/timezone/UTC, Error fetching date, CURLcode: 52
Trying API: https://timeapi.io/api/Time/current/zone?timeZone=UTC
API: https://timeapi.io/api/Time/current/zone?timeZone=UTC, Retry 1 failed, CURLcode: 28
API: https://timeapi.io/api/Time/current/zone?timeZone=UTC, Retry 2 failed, CURLcode: 28
API: https://timeapi.io/api/Time/current/zone?timeZone=UTC, Retry 3 failed, CURLcode: 28
API: https://timeapi.io/api/Time/current/zone?timeZone=UTC, Error fetching date, CURLcode: 28
All APIs failed
1 Antwort
Wieso willst du denn eine WebAPI für das Datum und die Uhrzeit benutzen? Du kannst doch die integrierten Funktionen nutzen um Datum und Uhrzeit abzurufen.
Selbst wenn könntest du auch jeden belibiegen Webserver anfragen und aus der Antwort den Date Header entnehmen.
Der Sinn von der Datum Abfrage ist um zu überprüfen ob meine Zugangsschlüssel noch aktuell sind und das lokale Datum würde ich ungern benutzen da man es ziemlich simple manipulieren kann