Alternatives for retrieving datetime

Hello,
I use https://tools.aimylogic.com/api/now?tz=Europe/Paris\u0026format=dd/MM/yyyy%20HH:mm in my scenes to retrieve time/date/etc., but it seems it hasn’t worked since early September (yes I know it’s mid-October, I’m only waking up now :joy:).

Have others seen this issue?
If so, and if you have a solution, what are you using now?
Thanks in advance :wink:

EDIT (after thinking): on my Unifi system, I blocked Russia some time ago (probably early September) but aimylogic is… Russian… and so I blocked this datetime service. By re-allowing that country, my API calls work again.

Anyway, would you have another service that does the same thing but outside Russia?

Hi @mutmut,

I don’t know if this can help you, I found: https://worldtimeapi.org/api/timezone/Europe/Paris

Which returns:

{
  "utc_offset": "+02:00",
  "timezone": "Europe/Paris",
  "day_of_week": 1,
  "day_of_year": 293,
  "datetime": "2025-10-20T09:09:19.099366+02:00",
  "utc_datetime": "2025-10-20T07:09:19.099366+00:00",
  "unixtime": 1760944159,
  "raw_offset": 3600,
  "week_number": 43,
  "dst": true,
  "abbreviation": "CEST",
  "dst_offset": 3600,
  "dst_from": "2025-03-30T01:00:00+00:00",
  "dst_until": "2025-10-26T01:00:00+00:00",
  "client_ip": "176.138.118.144"
}

Otherwise: https://timeapi.io/api/Time/current/zone?timeZone=Europe/Paris

{
  "year": 2025,
  "month": 10,
  "day": 20,
  "hour": 9,
  "minute": 14,
  "seconds": 1,
  "milliSeconds": 935,
  "dateTime": "2025-10-20T09:14:01.9353474",
  "date": "10/20/2025",
  "time": "09:14",
  "timeZone": "Europe/Paris",
  "dayOfWeek": "Monday",
  "dstActive": true
}

After that I tried to find a service that would allow formatting but I can’t find one :smiley:

Out of curiosity, what is it for?

hi @pierre-gilles
thanks for your research!
I had found worldtimeapi but there wasn’t a separation of day/month/year/hour/minute like with aimylogic.
timeapi seems to do the job very well with some extra info, that’s cool.

To find a replacement candidate for aimylogic and block bots coming from Russia with my UniFi.
And from a Gladys functional point of view, I use it in scenes like for Tuto - Domotiser son lave linge avec une prise connectée for example.

And I just saw that I can also retrieve the next day, which will allow me (still for the washing machine tutorial) to know whether there is a 31st day or not for consumption calculations:


Also the leap years with: https://timeapi.io/api/conversion/dayoftheyear/2028-12-31
In 2025, it’s 365 days: https://timeapi.io/api/conversion/dayoftheyear/2025-12-31

1 Like

Ok, super interesting!

In this tutorial, why would you want to run the cost calculation at 23:59 on the 30th/31st of the month (1 minute before the end of the month), rather than run this scene every 1st of the month at 00:00 (exactly the end of the month)? :stuck

To keep the monthly cost and have a correct stats graph.

If you calculate on 01/11/25 at 00:00, then the cost will be allocated to the month of November. But we want the cost for the month of October in the charts, hence the calculation on 31/10/25 at 23:59, for example.

In my case, I’m on the 1st of the month because I didn’t want to create too many scenes, but that skews the stats a bit and I have a one-month offset:


Normally I should have €1.13 for September’s consumption but I’m on October 1st, though that’s going to change :wink:

[quote=« mutmut, post:5, topic:9787 »]
If you calculate on 01/11/25 at 00:00, then the cost will be allocated to the month of November. But we want the cost for the month of October in the charts, hence the calculation on 31/10/25 at

4 Likes