chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] dateutils (choosing right timezone for future date)


From: Graham Fawcett
Subject: [Chicken-users] dateutils (choosing right timezone for future date)
Date: Tue, 29 Jan 2008 15:07:05 -0500

Hi folks,

In case it helps others, I've bundled up my timezone-discovering code
(attached). I should make an egg but I don't have the time right now.
I'm putting it in the public domain; might only work on Unix-like
OS'es.

[proc] (local-timezone y m d #!optional (hr -1) (min -1) (as-offset #f))

;; return the timezone for the given date as a string,
;; (e.g. "EST"). If as-offset is true, then return it in RFC-822
;; format (e.g. "-0500").

[proc] (local-timezone/srfi-19 y m d #!optional (hr -1) (min -1))

;; return the timezone for the given date in SRFI-19 format.

[proc] (make-local-date nsec sec min hour day month year)

;; Make a SRFI-19 date in the local timezone, honouring daylight savings
;; rules. Requires SRFI-19 to work (make-date).

Graham

Attachment: dateutils.tgz
Description: GNU Zip compressed data


reply via email to

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