Handbook
Glossary
convert-timezone ( timestamp duration -- timestamp )
Calendar
Prev:
>utc ( timestamp -- timestamp' )
Next:
Relative timestamps
Vocabulary
calendar
Inputs
timestamp
a
timestamp
duration
a
duration
Outputs
timestamp
a
timestamp
Word description
Converts the
timestamp
's
gmt-offset
to the GMT offset represented by the
duration
.
Examples
USING: accessors calendar prettyprint ; now-gmt noon instant -5 >>hour convert-timezone gmt-offset>> hour>> .
-5
See also
local-time
,
>local-time
,
convert-local-time
,
gmt
,
>gmt
,
convert-gmt
,
utc
,
>utc
,
convert-utc
Definition
USING:
accessors
calendar.private
kernel
;
IN:
calendar
:
convert-timezone
( timestamp duration -- timestamp )
[
over
gmt-offset>>
time-
(time+)
]
[
>>gmt-offset
]
bi
;