[local-time-devel] a bunch of fixes and news

Attila Lendvai attila.lendvai at gmail.com
Tue Feb 5 19:44:16 UTC 2008


dear list,

we've got a few patches available at:

darcs pull http://common-lisp.net/project/cl-dwim/darcs/local-time/

the changelog is appended at the end of the mail. i'm waiting for
approval before pushing them to the official as it also contains
non-backwards compatible changes.

there are two important things:
  1) correctly implement the gregorian leap year rules, so that going
below 1900 and above 2100 doesn't break
  2) added a generic adjust-local-time interface and refactor the
various mutators into it.

some more tests would be useful, but i'm out of steam for now (and i'd
propose moving to stefil from 5am, so maybe it's a good thing for you
:)

all the old tests pass (after fixing some of them), except that
daylight saving one that never passed.

i hope you'll like the changes,

-- 
 attila


Mon Dec 31 20:01:57 CET 2007  levente.meszaros at gmail.com
  * Eliminated confusing local-time-diff. Added local-time+ and
local-time- and encode-duration. Durations are represented in seconds.
Shall I push this patch? (1/9)  [ynWvpxqadjk], or ? for help: y

Tue Feb  5 18:01:34 CET 2008  attila.lendvai at gmail.com
  * don't :use cl-fad, use fully qualified symbols
Shall I push this patch? (2/9)  [ynWvpxqadjk], or ? for help: y

Tue Feb  5 18:02:14 CET 2008  attila.lendvai at gmail.com
  * added clone-local-time
Shall I push this patch? (3/9)  [ynWvpxqadjk], or ? for help: y

Tue Feb  5 18:44:02 CET 2008  attila.lendvai at gmail.com
  * follow the adjust-local-time patch in the tests, fix some leap day
related tests
Shall I push this patch? (4/9)  [ynWvpxqadjk], or ? for help: y

Tue Feb  5 18:50:13 CET 2008  attila.lendvai at gmail.com
  * an unfortunately big patch with INCOMPATIBLE CHANGES.

  - fix gregorian leap year rules: 100 and 400 years rules were not taken
    into account which broke timestamps when using cl-postgres and year far
    enough from now.

  - added adjust-local-time, and adjust-local-time! (which sideeffects the
    changes into the input).

    example uses:

    (adjust-local-time sunday (offset :day-of-week :monday))
    (adjust-local-time epoch (set :timezone to utc-1))
    (adjust-local-time sunday (offset :day by 3))

    "to" and "by" is optional and otherwise is ignored.

  the INCOMPATIBLE CHANGES:
  - LOCAL-TIME-ADJUST has been renamed to ADJUST-TO-TIMEZONE and not
    exported anymore. the return values (day sec) has been swapped
    to match the small->large order everywhere else.
    instead use: (adjust-local-time time (set :timezone +utc-zone+))

  - LOCAL-TIME-ADJUST-DAYS removed in favor of
    (adjust-local-time day (offset :day-of-week :monday))

  - MODIFIED-LOCAL-TIME and ADJUSTED-LOCAL-TIME has been merged into
    ADJUST-LOCAL-TIME

  - the non-exported LOCAL-TIME-SUM has been dropped
Shall I push this patch? (5/9)  [ynWvpxqadjk], or ? for help: y

Tue Feb  5 19:04:52 CET 2008  attila.lendvai at gmail.com
  * reorder some definitions to load it cleanly, add an eval-when, too
(splitting into multiple files would help, too)
Shall I push this patch? (6/9)  [ynWvpxqadjk], or ? for help: y

Tue Feb  5 19:06:30 CET 2008  attila.lendvai at gmail.com
  * use some +constants+ for readability purposes
Shall I push this patch? (7/9)  [ynWvpxqadjk], or ? for help: y

Tue Feb  5 19:42:40 CET 2008  attila.lendvai at gmail.com
  * delete an impossible case in %set-local-time-part
Shall I push this patch? (8/9)  [ynWvpxqadjk], or ? for help: y

Tue Feb  5 20:29:04 CET 2008  attila.lendvai at gmail.com
  * added test-parse/format-consistency
Shall I push this patch? (9/9)  [ynWvpxqadjk], or ? for help:



More information about the local-time-devel mailing list