Time difference import posts via API in France

Hi,

I’m almost finished migrating data from an old forum to a Discourse forum.

When I import my posts via CURL and the Discourse APIs, I get a time lag.

Example 1:

curl -X POST "https://monappli/posts.json" -H \
-H "Api-Key: cle_api" \
-H "Api-Username: username" \
-F "category=number_category" \
-F $'title=title' \
-F $'raw=description' \
-F "created_at=2004-05-27 *12:18*"

→ In Discourse: 27 mai 2004 14:18 (2 hours time difference)

Example 2:

curl -X POST "https://monappli/posts.json" \
-H "Api-Key: cle_api" \
-H "Api-Username: username" \
-F "category=category_number" \
-F $'title=title' \
-F $'raw=description' \
-F "created_at=2005-01-24 *16:23*"

→ In Discourse: 24 janvier 2005 17:23 (1 hour time difference)

I looked at the dates on my different machines:

  • on my local station: Thu. Dec. 21 2023 14:23:13 CET
  • on the host machine containing docker Discourse: Thu. Dec. 21 14:23:13 CET 2023
  • in docker: Thu. Dec 21 2023 13:23:13 UTC (1 hour offset)

Can you tell me how to insert the dates of my old forums without time difference?

Thanks for your help

I don’t know how to fix that but I’m quire sure times you are using via curl are seen as UTC. And then you have one hours offset at winter and two hours ar spring/summer.