I am trying to get org-mode to insert a custom timestamp with the current time.

Something along these lines:

20160824 34|3 163000 (UTC)

Which I believe should be the following:

("%Y%m%d %W|%u %H%M%S (%Z)")

However, after editing org-time-stamp-custom-formats using the Customize Browser, I get the following:

Y0824 34|3 000000 (UTC


  1. Year does not display.
  2. Current time is not displayed.
  3. End parenthesis does not display.

I have read through the org-mode manual and searched online, but am still very lost.

  • 1
    If I do (format-time-string "%Y%m%d %W|%u %H%M%S (%Z)") I get "20160824 34|3 193407 (CEST)". What happens if you just execute that snippet? – Tephra Aug 24 '16 at 17:35
  • 1
    The doc-string for org-time-stamp-custom-formats essentially says do not change this because it will cause you problems in the future. Just use (insert ....) and replace ... with the code by @Tephra above. The format of org-time-stamp-custom-formats is a cons cell with a CAR and a CDR, so that may be why you are having problems -- you need to specify one or the other -- (car org-time-stamp-custom-formats) or (cdr org-time-stamp-custom-formats) -- however, you still shouldn't mess with those values. – lawlist Aug 24 '16 at 19:15
  • Thank you. Everything works fine using the shell and and executing the snippet. However, the custom timestamp via org-mode customization still does not work correctly. Lawlist, not sure I have the emacs experience to grasp the underlying technical aspects, but I'm a bit confused as to the need to avoid customization. The manual seems to suggest that it's fine to have a custom timestamp: orgmode.org/manual/Custom-time-format.html. What am I missing? Thanks again! – dwrz Aug 25 '16 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.