[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs Calc: converting FROM Unix Time, unrecognized time zone

From: jay . p . belanger
Subject: Re: Emacs Calc: converting FROM Unix Time, unrecognized time zone
Date: 7 May 2007 14:19:59 -0700
User-agent: G2/1.0

On May 5, 12:38 am, Alan <address@hidden> wrote:
> On May 5, 1:31 am, Jay Belanger <address@hidden> wrote:
> > Enter the date with algebraic notation:
> > <2007-05-05 14:30>
> > then, to get the hours, either `C-u 4 t P' or
> > `t P', and then type `4' at the prompt (which will also tell you which
> > number to type to get the date parts: `1' for year,..., `4' for hours).
> This is very helpful.  It gives me HH:mm.  Is it possible to extract
> HH.xx (hours and decimals) directly?

Are you using `t P 9' to get HMS form, then?  `t P 4' should just get
you HH, not HH:mm.
I don't think you can get HH.xx directly, but you could `t P 9' to get
hms form, and then
enter `M-x calc-from-hms' (`x', then `from-hms').

> As far as I can find in the calc manual, I am told to set the
> variable [var-TimeZone], but I have not been able to find out what is the 
> format of
> the variable?
> For now I set GMT-10 by "s T', like this:
> "GMT-10". If I were to try to set ChST, the time zone more generally used on 
> my
> Island, would I have to edit also "calc-forms.el?  And what would I
> need to enter?  There is no ChDT.

I suppose there should be more time zones added to `math-tzone-
names'.   You shouldn't edit calc-forms.el, but rather copy the value
of `math-tzone-names' from that file, and the appropriate values.  So
it should look something like
(setq math-tzone-names
   '(("UTC" 0 0)
( "YGT" 9 "YST" "YDT" ) ( "YST" 9 0 ) ( "YDT" 9 -1 )  ; Yukon

  ("ChST" 10 0)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]