Changeset 36949 in project


Ignore:
Timestamp:
12/02/18 00:59:06 (9 days ago)
Author:
kon
Message:

name params correctly, reflow

Location:
release/4/locale/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/locale/trunk/locale-builtin.scm

    r36946 r36949  
    6161  (let* (
    6262    (tm (current-local-time))
    63     (tzn (local-timezone-name tm)
    64           #; ;Not until Posix bug fixed
    65           (local-timezone-abbreviation))
     63    (tzn (local-timezone-abbreviation) #;(local-timezone-name tm))
    6664    (tzo (tm-off tm))
    6765    (dst? (tm-dst? tm)) )
    6866    ;Since the tzo reflects the dst status need to fake the one not in effect.
     67    ;UTC doesn't have dst
    6968    (if dst?
    70       (make-posix-timezone UNKNOWN-LOCAL-TZ-NAME (+ tzo DEFAULT-DST-OFFSET) tzn tzo)
    71       (make-posix-timezone tzn tzo UNKNOWN-LOCAL-TZ-NAME (- tzo DEFAULT-DST-OFFSET)) ) ) )
     69      (make-posix-timezone
     70        UNKNOWN-LOCAL-TZ-NAME (+ tzo DEFAULT-DST-OFFSET)
     71        tzn tzo)
     72      (make-posix-timezone
     73        tzn tzo
     74        UNKNOWN-LOCAL-TZ-NAME (if (zero? tzo) 0 (- tzo DEFAULT-DST-OFFSET))) ) ) )
    7275
    7376(define (use-builtin-timezone)
  • release/4/locale/trunk/locale-posix.scm

    r36946 r36949  
    3535;;;
    3636
    37 ;;miscmacros
    38 
    39 ;; evaluates body with an explicit exit continuation
    40 ;;
    41   (define-syntax let/cc
    42     (syntax-rules ()
    43       ((let/cc k e0 e1 ...)
    44        (call-with-current-continuation
    45         (lambda (k) e0 e1 ...)))))
    46 
    4737;;fx-utils
    4838
     
    8676      #\: (fxmod rsecs SEC/MIN)) ) )
    8777
    88 (define (make-posix-timezone dst-tzn dst-off std-tzn std-off)
     78(define (make-posix-timezone std-tzn std-off dst-tzn dst-off)
    8979  (string-append
    90     dst-tzn (seconds->h:m:s-string dst-off)
    91     std-tzn (seconds->h:m:s-string std-off)) )
     80    std-tzn (seconds->h:m:s-string std-off)
     81    dst-tzn (seconds->h:m:s-string dst-off)) )
    9282
    9383;;; Timezone
Note: See TracChangeset for help on using the changeset viewer.