Hi,
I'm new to AutoLisp. I am wondering if there is a way to get DateTime in UTC.
I know we can use CDate and Date but it only return PC date.
And also how to convert Date Time to bytes?
Thank you so much
I'm not sure of exactly what you are looking for but DOSLIB from Robert McNeel & Associates has some date tools (and lots of other good tools) that could help you.
I need to get current UTC datetime with autolisp.
I tried common lisp comand use (get-universal-time) . It will return
; error: no function definition: GET-UNIVERSAL-TIME
Now my code is
(defun c:testing (setq time (rtos (getvar "CDATE"))) (princ) (princ time) (princ) )
It returns
20170329.0941 (current PC datetime)
I need to return
20170329.0141 (current UTC datetime)
If you're trying to get a time 8 hours earlier in a string similar to CDATE, then this should work:
(menucmd "M=$(edtime,$(-,$(getvar,date),0.3333333333),YYYYMODD\".\"HHMMSSMSEC)")
Can't find what you're looking for? Ask the community or share your knowledge.