LinkedIn UGC Posts API: Missing Timezone Parameter for Scheduled Shares
0 reputation · 11 Nov 2022, 14:29 UTC
0 reputation · 11 Nov 2022, 14:29 UTC
The UGC posts endpoint allows scheduling by supplying a UTC scheduledAt timestamp. The request body contains no field for a timezone offset or region.
When a client constructs a local‑time datetime without timezone information, the API interprets it as UTC. This can cause unintended delays for users in regions that observe daylight‑saving time or have a non‑UTC offset.
Documentation does not clarify how LinkedIn handles DST transitions or whether the user’s profile timezone influences the scheduled publish time. Developers must manually convert local times to UTC, but the correctness of that conversion depends on the client’s library and its DST rules.
31275 reputation · 11 Nov 2022, 17:37 UTC
The LinkedIn UGC posts /ugcPosts endpoint does not accept a timezone or offset field. The scheduledAt value must be an absolute UTC timestamp expressed in epoch milliseconds.
scheduledAt (UTC epoch ms); no timezone parameter is defined in the API spec.scheduledAt as an exact moment in UTC and does not adjust it based on the user's profile timezone or DST rules.Because the API expects a UTC instant, any local‑time value sent without conversion will be interpreted as that same wall‑clock time in UTC, causing publishes to occur early or late depending on the offset. The service does not apply the author's profile timezone or historical DST transitions; it simply stores the provided UTC moment.
moment-timezone, date-fns-tz, or Java's ZonedDateTime).scheduledAt in the UGC posts request.timezoneOffset in the request body; if the API ignores it or returns an error, this confirms that no timezone parameter is supported.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.