picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit eb83dc06a69e49e969d694f96bf450a718cc9ec9
parent 5c246be747d671dceaf856e4beb6f89b3fb37282
Author: Alexander Burger <abu@software-lab.de>
Date:   Thu, 17 Jan 2013 16:01:57 +0100

Browser-local time in 'expires'
Diffstat:
Mlib.css | 4++--
Mlib/form.l | 19+++++++++++++++----
2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/lib.css b/lib.css @@ -1,4 +1,4 @@ -/* 18nov12abu +/* 17jan13abu * 17nov12jk * (c) Software Lab. Alexander Burger */ @@ -85,7 +85,7 @@ a:hover { left: 0; width: 18em; height: 100%; - padding: 1ex 0; + padding-top: 2ex; background-color: #d0d0d0; } diff --git a/lib/form.l b/lib/form.l @@ -1,4 +1,4 @@ -# 19oct12abu +# 17jan13abu # (c) Software Lab. Alexander Burger # *PRG *Top *Gui *Btn *Get *Got *Form *Evt *Lock *Spans @@ -6,14 +6,18 @@ (allow "@img/" T) (push1 '*JS (allow "@lib/form.js")) -(mapc allow '(*Gui *Get *Got *Form *Evt *Drop "!jsForm" *JsHint "!jsHint")) +(mapc allow + '(*Gui *Get *Got *Form *Evt *Drop "!jsForm" *JsHint "!jsHint" "!tzOffs") ) (one "*Cnt") -(off "*Lst" "*Post2" "*Cho") +(off "*Lst" "*Post2" "*Cho" "*TZO") (de *Throbber ("+---" "-+--" "--+-" "---+" "--+-" "-+--" .) ) +(de tzOffs (Min) + (setq "*TZO" (* Min 60)) ) + # Define GUI form (de form ("Attr" . "Prg") (inc '*Form) @@ -277,7 +281,14 @@ (pack "TimeOut" " " - (tim$ (% (+ (time) (/ (cadr (assoc -1 *Run)) 1000)) 86400)) ) ) + (let Tim (+ (time T) (/ (cadr (assoc -1 *Run)) 1000)) + (if "*TZO" + (tim$ (% (- Tim -86400 @) 86400)) + (javascript NIL + (text + "lisp('@1!tzOffs', \"+\" + (new Date()).getTimezoneOffset());" + *SesId ) ) + (pack (tim$ (% Tim 86400)) " UTC") ) ) ) ) # Return chart property (de chart @