dangom / writefreely.el

*Frictionless* blogging with Org Mode. No setup required.
90 stars 7 forks source link

Support for 'created' date on post. #9

Closed mrvdb closed 5 years ago

mrvdb commented 5 years ago

It would be nice if the org keyword '#+DATE' would be used in the api call as the created parameter. This would allow to import existing org files without having them all on the same date on publish and would also allow to schedule postings in the future.

dangom commented 5 years ago

Sounds reasonable. I've added support for both #+DATE and #+LANGUAGE. However, I don't know if the created date is actually being used on the other end of the API, or if there is still something wrong with my date formatting (using ISO8601 so it should be ok) because the displayed date still shows today.

mrvdb commented 5 years ago

I'll test it on the qua.name instance tomorrow. Thanks!

mrvdb commented 5 years ago

Apparently the timezone parsing on the backend is a bit wonky. It expects a literal 'Z' in the timezone part. (zero/zulu time, see https://en.wikipedia.org/wiki/ISO_8601) After that it works for me.

I can make a PR if you like, but it's a one char change in writefreely--formatted-date-from-keyword

dangom commented 5 years ago

Worked here as well. Made it so that the time gets converted to UTC before submission and added the Z to the format string.