Changeset 35410 in project


Ignore:
Timestamp:
04/21/18 21:41:01 (4 months ago)
Author:
kon
Message:

local-timezone-locale init to (current-timezone-components) delayed till 1st use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/srfi-19/trunk/srfi-19-timezone.scm

    r35407 r35410  
    3535;;
    3636
    37 (define-parameter local-timezone-locale (current-timezone-components)
     37(define-parameter local-timezone-locale #f
    3838  (lambda (x)
    3939    (cond
    40       ((timezone-components? x)
     40      ((or (not x) (timezone-components? x))
    4141        x )
    4242      (else
     
    5555;;
    5656
     57(define (local-timezone-locale*)
     58  (or
     59    (local-timezone-locale)
     60    (begin
     61      (local-timezone-locale (current-timezone-components))
     62      (local-timezone-locale))) )
     63
     64;;
     65
    5766#;;Unusued
    5867(define (make-timezone-locale nam off dst?)
     
    6372
    6473(define (timezone-locale-name . tzc)
    65   (let ((tzc (optional tzc (local-timezone-locale))))
     74  (let ((tzc (optional tzc (local-timezone-locale*))))
    6675    (check-timezone-components 'timezone-locale-name tzc)
    6776    (let ((tzn (timezone-components-ref/dst? tzc 'dst-name 'std-name)))
     
    7281
    7382(define (timezone-locale-offset . tzc)
    74   (let ((tzc (optional tzc (local-timezone-locale))))
     83  (let ((tzc (optional tzc (local-timezone-locale*))))
    7584    (check-timezone-components 'timezone-locale-offset tzc)
    7685    (let ((tzo (timezone-components-ref/dst? tzc 'dst-offset 'std-offset)))
     
    8089
    8190(define (timezone-locale-dst? . tzc)
    82   (let ((tzc (optional tzc (local-timezone-locale))))
     91  (let ((tzc (optional tzc (local-timezone-locale*))))
    8392    (check-timezone-components 'timezone-locale-offset tzc)
    8493    (timezone-component-ref tzc 'dst?) ) )
     
    97106  (cond
    98107    ((not tzi)                    (utc-timezone-locale))
    99     ((boolean? tzi)               (local-timezone-locale))
     108    ((boolean? tzi)               (local-timezone-locale*))
    100109    ((timezone-components? tzi)   tzi)
    101110    ((fixnum? tzi)                tzi)
Note: See TracChangeset for help on using the changeset viewer.