Explorar el Código

saver - use default timezone for notifications

Innocenty Enikeev hace 8 años
padre
commit
128b028a84
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      plugins/saver.lisp

+ 2 - 1
plugins/saver.lisp

@@ -1,5 +1,6 @@
 (in-package #:chatikbot)
 
+(defsetting *saver-default-timezone* 3 "Default timezone for *saver-notify-hour* calculation. GMT+3")
 (defsetting *saver-notify-hour* 11 "Notify with upcoming payments and saves at this time")
 
 (defstruct saver/payment name amount schedule started)
@@ -215,7 +216,7 @@
 
 (defcron process-saver (:hour '*)
   (let* ((moment (get-universal-time))
-         (hour (nth 2 (multiple-value-list (decode-universal-time moment)))))
+         (hour (nth 2 (multiple-value-list (decode-universal-time moment *saver-default-timezone*)))))
     (when (>= hour *saver-notify-hour*)
       (dolist (cp (saver/find-today-payments moment))
         (db-transaction