[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Formatting time as local time?
From: |
Elena |
Subject: |
Re: Formatting time as local time? |
Date: |
Wed, 08 Dec 2010 15:16:29 -0000 |
User-agent: |
G2/1.0 |
Thanks Tim. Indeed "(current-time-zone)" showed my timezone was +0000.
Now I have to make sense of using the "TZ" environment variable and
"(set-time-zone-rule)". It seems I can't get sensible results. Here is
what I think I should use:
(setenv "TZ" "Europe/Rome") ;; I don't know whether this value is
correct, since I can't find a list of values.
(set-time-zone-rule "GMT+1")
(format-time-string "%a, %e %b %Y %T %Z" (nth 5 (file-attributes my-
file-name)) nil) ;; nil -> Local Time
However I'm getting a wrong local time (three hours before the correct
one).
OS is Windows XP.