Skip to content

Commit

Permalink
Use ash function instead of lsh
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Jan 5, 2024
1 parent 007dd38 commit c4ee8ef
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions datetime-format.el
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
;; (datetime-format 'atom nil :timezone "America/New_York") ;=> "2016-05-18T13:05:41-04:00"

;;; Code:
;;(require 'timezone)

(defconst datetime-format--fmt-atom
'(local . "%Y-%m-%dT%H:%M:%S%:z")
"ATOM date construct format (local time).
Expand Down Expand Up @@ -153,8 +151,8 @@ See URL `https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'"
"Convert INT to time stamp list.
See describe `current-time' function."
(let* ((low (- (lsh 1 16) 1)) (high (lsh low 16)))
(list (lsh (logand high int) -16) (logand low int) 0 0)))
(let* ((low (- (ash 1 16) 1)) (high (ash low 16)))
(list (ash (logand high int) -16) (logand low int) 0 0)))

(defun datetime-format-convert-timestamp-dwim (time &optional timezone)
""
Expand Down

0 comments on commit c4ee8ef

Please sign in to comment.