с помощью .setUTCHours()
было бы возможно установить даты в UTC-времени, что позволило бы вам использовать UTC-время во всей системе.
Вы не можете установить его, используя UTC в конструкторе, если только вы не укажете строку даты. Strike>
Используя new Date(Date.UTC(year, month, day, hour, minute, second))
, вы можете создать объект Date из определенного UTC время.
Это очень не отличается, чем хороший ответ lawlist, но имеет немного отличающуюся информацию и адаптируется в соответствии с теми, кто использует Отклонить диспетчер пакетов:
(use-package dired
:custom
;; See http://stackoverflow.com/questions/4115465/emacs-dired-too-much-information
;; NOTE: Just some information worth keeping in mind. More readable dired file
;; size output - consider adding F (make file type obvious), or p (p adds a
;; trailing slash to dirs, but makes moving dirs fail), and G (colorize) too.
(dired-listing-switches "-alh --group-directories-first")
:config
;; [[https://stackoverflow.com/questions/4076360/error-in-dired-sorting-on-os-x][macos - error in dired sorting on OS X - Stack Overflow]]
;; To fix the
;; (error "Listing directory failed but 'access-file' worked")
;; error. Emacs needs to use gnu's ls, which I get through nixpkgs' coreutils.
;; In my config, currently, Emacs is not picking up the path to my nix install
;; ls (todo: fix).
;;
;; Note that, unlike the info at the link provided above,
;; --group-directories-first is not needed to fix this error. I just like to
;; see the directories first in a dired buffer.
(setq insert-directory-program (expand-file-name ".nix-profile/bin/ls"
(getenv "HOME"))))