# Time difference import posts via API in France

**URL:** https://meta.discourse.org/t/time-difference-import-posts-via-api-in-france/289452
**Category:** Migration
**Tags:** rest-api
**Created:** [December 21, 2023, 2:09pm UTC](https://meta.discourse.org/t/time-difference-import-posts-via-api-in-france/289452 "2023-12-21T14:09:15Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![FLucas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/flucas/32/317231_2.png) [@FLucas](https://meta.discourse.org/u/FLucas)
#### Post date: [December 21, 2023, 2:09pm UTC](https://meta.discourse.org/t/time-difference-import-posts-via-api-in-france/289452/1 "2023-12-21T14:09:15Z")

</div>

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:

```plaintext
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:

```plaintext
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

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [December 21, 2023, 3:45pm UTC](https://meta.discourse.org/t/time-difference-import-posts-via-api-in-france/289452/2 "2023-12-21T15:45:40Z")

</div>

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.
