"Pascal J. Bourguignon" <
p...@informatimago.com> writes:
> Patrick May <
pat...@softwarematters.org> writes:
>
>> I've been spending some quality time with encode-universal-time,
>> decode-universal-time, and the joy of time zones. I need to store time
>> ranges for multiple time zones in a database, update and retrieve them,
>> and perform some comparisons relative to the current time and future
>> times. Postgres handles the storage fine, but juggling time zones in
>> Lisp is becoming more trouble than it's worth.
>
> Universal times in lisps are seconds since 1900-01-01 00:00:00 UTC.
> I don't see what trouble you may have dealing with such a simple
> representation.
I have business hours and holidays specified by multiple customers
in different time zones. I need to determine if the customer is open at
a particular time (either the current time or a future time). My
initial thought was to use the Postgres TIME(0) WITH ZONE format and
encode-universal-time with time-zone specified as appropriate for the
customer.
In practice, keeping the timezones between Lisp and Postgres
aligned is a minor annoyance and the fact that decode-universal-time
returns the current daylight-p and zone rather than the one I specified
with encode-universal-time (in ccl) violates the principle of least
surprise for me. I thought that someone else might already have
addressed these issues.
>> I'm just about to rewrite this module to always use UTC and only
>> change the values for display, but before I do I was wondering if anyone
>> had a recommendation for a good time package.
>
>
> cliki says local-time.
>
>
http://cliki.net/site/search?query=time
Thanks, that's the kind of thing I was looking for.
Patrick