1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

Changes from arch/CVS synchronization

This commit is contained in:
Ludovic Courtès 2007-07-09 16:47:56 +00:00
parent d3075c52ac
commit 0867f7baa8
6 changed files with 26 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2007-07-09 Ludovic Courtès <ludo@gnu.org>
* NEWS: Mention SRFI-19 `date->julian-day' bug fix.
2007-06-26 Ludovic Courtès <ludo@gnu.org> 2007-06-26 Ludovic Courtès <ludo@gnu.org>
* NEWS: Mention fixed memory leaks. * NEWS: Mention fixed memory leaks.

3
NEWS
View file

@ -53,9 +53,10 @@ extensions.)
** `*' returns exact 0 for "(* inexact 0)" ** `*' returns exact 0 for "(* inexact 0)"
This follows what it always did for "(* 0 inexact)". This follows what it always did for "(* 0 inexact)".
** SRFI-19: Value returned by `(current-time time-process)' was incorrect ** SRFI-19: Value returned by `(current-time time-process)' was incorrect
** SRFI-19: `date->julian-day' did not account for timezone offset
** `ttyname' no longer crashes when passed a non-tty argument ** `ttyname' no longer crashes when passed a non-tty argument
** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address ** `inet-ntop' no longer crashes on SPARC when passed an `AF_INET' address
** Small memory leaks have been fixed in `make-fluids' and `add-history' ** Small memory leaks have been fixed in `make-fluid' and `add-history'
** Build problems on Solaris fixed ** Build problems on Solaris fixed
** Build problems on Mingw fixed ** Build problems on Mingw fixed

View file

@ -1,3 +1,8 @@
2007-07-09 Ludovic Courtès <ludo@gnu.org>
* srfi-19.scm (date->julian-day): Take OFFSET into account.
Patch by Jon Wilson <j85wilson@fastmail.fm>.
2007-05-09 Ludovic Courtès <ludo@chbouib.org> 2007-05-09 Ludovic Courtès <ludo@chbouib.org>
* srfi-19.scm (priv:current-time-process): Removed shadowing * srfi-19.scm (priv:current-time-process): Removed shadowing

View file

@ -811,10 +811,12 @@
(hour (date-hour date)) (hour (date-hour date))
(day (date-day date)) (day (date-day date))
(month (date-month date)) (month (date-month date))
(year (date-year date))) (year (date-year date))
(offset (date-zone-offset date)))
(+ (priv:encode-julian-day-number day month year) (+ (priv:encode-julian-day-number day month year)
(- 1/2) (- 1/2)
(+ (/ (+ (* hour 60 60) (+ (/ (+ (- offset)
(* hour 60 60)
(* minute 60) (* minute 60)
second second
(/ nanosecond priv:nano)) (/ nanosecond priv:nano))

View file

@ -1,3 +1,8 @@
2007-07-09 Ludovic Courtès <ludo@gnu.org>
* tests/srfi-19.test (`time-utc->julian-day' honors timezone):
New. Suggested by Jon Wilson <j85wilson@fastmail.fm>.
2007-06-26 Ludovic Courtès <ludo@gnu.org> 2007-06-26 Ludovic Courtès <ludo@gnu.org>
* tests/socket.test (htonl): Only executed if `htonl' is defined. * tests/socket.test (htonl): Only executed if `htonl' is defined.

View file

@ -141,6 +141,12 @@ incomplete numerical tower implementation.)"
(test-dst time-monotonic->date date->time-monotonic) (test-dst time-monotonic->date date->time-monotonic)
(test-dst julian-day->date date->julian-day) (test-dst julian-day->date date->julian-day)
(test-dst modified-julian-day->date date->modified-julian-day) (test-dst modified-julian-day->date date->modified-julian-day)
(pass-if "`date->julian-day' honors timezone"
(let ((now (current-date -14400)))
(time=? (date->time-utc (julian-day->date (date->julian-day now)))
(date->time-utc now))))
(pass-if "string->date respects local DST if no time zone is read" (pass-if "string->date respects local DST if no time zone is read"
(time=? (date->time-utc (time=? (date->time-utc
(with-tz "EST5EDT" (with-tz "EST5EDT"