Variable: display-time-string-forms

display-time-string-forms is a customizable variable defined in time.el.gz.

Value

Large value
((if
     (and
      (not display-time-format)
      display-time-day-and-date)
     (format-time-string "%a %b %e " now)
   "")
 (propertize
  (format-time-string
   (or display-time-format
       (if display-time-24hr-format "%H:%M" "%-I:%M%p"))
   now)
  'help-echo
  (format-time-string "%a %b %e, %Y" now))
 load
 (if mail
     (concat " "
	     (propertize display-time-mail-string 'display
			 `(when
			      (and display-time-use-mail-icon
				   (display-graphic-p))
			    ,@display-time-mail-icon ,@(if
							   (and display-time-mail-face
								(memq
								 (plist-get
								  (cdr display-time-mail-icon)
								  :type)
								 '(pbm xbm)))
							   (let
							       ((bg
								 (face-attribute display-time-mail-face :background)))
							     (if
								 (stringp bg)
								 (list :background bg)))))
			 'face display-time-mail-face 'help-echo "You have new mail; mouse-2: Read mail" 'mouse-face 'mode-line-highlight 'local-map
			 (make-mode-line-mouse-map 'mouse-2 read-mail-command)))
   "")
 " ")

Documentation

List of expressions governing display of the time in the mode line.

For most purposes, you can control the time format using display-time-format which is a more standard interface.

This expression is a list of expressions that can involve the keywords load, day, month, and year, 12-hours, 24-hours, minutes, seconds, all numbers in string form, and monthname, dayname, am-pm, and time-zone all alphabetic strings, and mail a true/nil value.

For example:

   ((substring year -2) "/" month "/" day
    " " 24-hours ":" minutes ":" seconds
    (if time-zone " (") time-zone (if time-zone ")")
    (if mail " Mail" ""))

would give mode line times like 94/12/30 21:07:48 (UTC).

Source Code

;; Defined in /usr/src/emacs/lisp/time.el.gz
(defcustom display-time-string-forms
  '((if (and (not display-time-format) display-time-day-and-date)
	(format-time-string "%a %b %e " now)
      "")
    (propertize
     (format-time-string (or display-time-format
			     (if display-time-24hr-format "%H:%M" "%-I:%M%p"))
			 now)
     'help-echo (format-time-string "%a %b %e, %Y" now))
    load
    (if mail
	;; Build the string every time to act on customization.
	;; :set-after doesn't help for `customize-option'.  I think it
	;; should.
	(concat
	 " "
	 (propertize
	  display-time-mail-string
	  'display `(when (and display-time-use-mail-icon
			       (display-graphic-p))
		      ,@display-time-mail-icon
		      ,@(if (and display-time-mail-face
				 (memq (plist-get (cdr display-time-mail-icon)
						  :type)
				       '(pbm xbm)))
			    (let ((bg (face-attribute display-time-mail-face
						      :background)))
			      (if (stringp bg)
				  (list :background bg)))))
	  'face display-time-mail-face
	  'help-echo "You have new mail; mouse-2: Read mail"
	  'mouse-face 'mode-line-highlight
	  'local-map (make-mode-line-mouse-map 'mouse-2
					       read-mail-command)))
      "")
    " ")
  "List of expressions governing display of the time in the mode line.
For most purposes, you can control the time format using `display-time-format'
which is a more standard interface.

This expression is a list of expressions that can involve the keywords
`load', `day', `month', and `year', `12-hours', `24-hours', `minutes',
`seconds', all numbers in string form, and `monthname', `dayname', `am-pm',
and `time-zone' all alphabetic strings, and `mail' a true/nil value.

For example:

   ((substring year -2) \"/\" month \"/\" day
    \" \" 24-hours \":\" minutes \":\" seconds
    (if time-zone \" (\") time-zone (if time-zone \")\")
    (if mail \" Mail\" \"\"))

would give mode line times like `94/12/30 21:07:48 (UTC)'."
  :type '(repeat sexp))