From: Raghuram
Subject: I am getting Half hr difference in time.
Date: 
Message-ID: <c08bb3ef.0310222259.3fdbd8fc@posting.google.com>
Hi,
  While using lisp function, get-decoded-time i am getting half-n-hour
(30 minutes) difference in time from the actual system time.

when i say execute (get-decoded-time) command, i am getting 
40
58
12
23
10
2003
t
-5 
 as results. Actual time was 12:28:40 PM in the OS when the command
was executed.

Could any body please tell me why i am getting 30 mins difference in
time.
(for your infomration: I am from India. I have selected time zone as
Asia/Calcutta in OS. Actually the time zone is GMT +5:30 but i am
getting time zone as -5.)

Thank you in advance.

-Raghuram

From: Vijay L
Subject: Re: I am getting Half hr difference in time.
Date: 
Message-ID: <1eaf81aa.0310230114.1105f9a0@posting.google.com>
···············@yahoo.com (Raghuram) wrote in message news:<····························@posting.google.com>...
> Hi,
>   While using lisp function, get-decoded-time i am getting half-n-hour
> (30 minutes) difference in time from the actual system time.
> 
> when i say execute (get-decoded-time) command, i am getting 
> 40
> 58
> 12
> 23
> 10
> 2003
> t
> -5 
>  as results. Actual time was 12:28:40 PM in the OS when the command
> was executed.
> 
> Could any body please tell me why i am getting 30 mins difference in
> time.
> (for your infomration: I am from India. I have selected time zone as
> Asia/Calcutta in OS. Actually the time zone is GMT +5:30 but i am
> getting time zone as -5.)
> 
> Thank you in advance.
> 
> -Raghuram

Please check the time you have on again because this is what I got
running (get-decoded-time) on clisp:

[42]> (get-decoded-time)
36 ;
37 ;
14 ;
23 ;
10 ;
2003 ;
3 ;
NIL ;
-11/2

I'm also in India with the Indian timezone.  That reminds me, I've got
to go watch the match :)

Cheers,
Vijay

All future commitments are optimistic.
From: Steven M. Haflich
Subject: Re: I am getting Half hr difference in time.
Date: 
Message-ID: <zELlb.5772$yx2.5593@newssvr29.news.prodigy.com>
Raghuram wrote:

> -5 
>  as results. Actual time was 12:28:40 PM in the OS when the command
> was executed.
> 
> Could any body please tell me why i am getting 30 mins difference in
> time.
> (for your infomration: I am from India. I have selected time zone as
> Asia/Calcutta in OS. Actually the time zone is GMT +5:30 but i am
> getting time zone as -5.)

Since this is more an issue of interface to the operating system than
an issue of langue semantics, it is very relevant which implementation
and platform you are using.  I suspect your implementation doesn't
handle non-integer time zones correctly.

I happen to be the person responsible for the ANS requirement that
CL handle any time zone that is an integral number of second between
+- 24 hours GMT.  This happened extempore at an X3J13 meeting where
the time functions were being considered.  It was very much on my mind
that time zones are political constructs rather than an astronomical
ons, and that fractional time zones exist in both "developed" and
"undeveloped" countries.  But at the time, CL usage in areas of
fractional tie zones was marginal, so it is quite possible that some
implementations didn't bother getting this detail correct.
From: Espen Vestre
Subject: Re: I am getting Half hr difference in time.
Date: 
Message-ID: <kwk76wfmaa.fsf@merced.netfonds.no>
···············@yahoo.com (Raghuram) writes:

> Could any body please tell me why i am getting 30 mins difference in
> time.

Bug in your lisp? Which one is it?
Can you use decode-universal-time with explicit timezone and get the
right result?

LW 4.2.7/linux seems to do the right thing for me when I use decode-
universal-time:

CL-USER 9 > (dolist (tz '(0 -2 -11/2))
              (multiple-value-bind (sec min hour)
                  (decode-universal-time (get-universal-time) tz)
                (format t "~2,'0d:~2,'0d:~2,'0d~%" hour min sec)))
07:23:58
09:23:58
12:53:58
NIL
-- 
  (espen)