time.el 1.0 KB

12345678910111213141516171819202122232425262728
  1. (setq display-time-24hr-format t) ; No AM/PM
  2. (setq calendar-date-style 'european) ; day/month/year style calendar
  3. (setq calendar-week-start-day 1) ; Monday is the first day of the week
  4. (defun wi-calendar-current-date-time ()
  5. "Return the formated string of current year month day hour minute."
  6. (interactive)
  7. (let* ((now (decode-time))
  8. (year (nth 5 now))
  9. (month (nth 4 now))
  10. (day (nth 3 now))
  11. (hour (nth 2 now))
  12. (minute (nth 1 now)))
  13. (kill-new (format "%d-%d-%d %d:%d" year month day hour minute))))
  14. ;; Interested in those timezones
  15. (with-eval-after-load 'time
  16. (setq display-time-world-time-format "%Z\t%a\t%d %B %H:%M")
  17. (setq display-time-world-list
  18. '(("Europe/Moscow" "Europe/Moscow")
  19. ("Europe/Berlin" "Europe/Berlin")
  20. ("Europe/London" "Europe/London")
  21. ("Europe/Istanbul" "Europe/Istanbul")
  22. ("America/Winnipeg" "America/Winnipeg")
  23. ("America/New_York" "America/New_York")
  24. ("Asia/Tokyo" "Asia/Tokyo")
  25. ("Asia/Bangkok" "Thailand"))))