Showing 1 changed files with 2 additions and 1 deletions
+2 -1
sms/bot
... ...
@@ -269,7 +269,8 @@ sub ssmtp_send_mail {
269 269
 
270 270
 sub wait_open_time ($$) {
271 271
     my ($close_hour, $open_hour) = @_;
272
-    while (strftime('%H', localtime) > $close_hour or strftime('%H', localtime) < $open_hour) {
272
+    my @lt = localtime;
273
+    while ($lt[2] >= $close_hour or $lt[2] <= $open_hour) {
273 274
         sleep 1800;
274 275
     }
275 276
 }