CREATE OR REPLACE VIEW `_oTickery` AS SELECT * FROM `_tickery` WHERE TIME(IFNULL(CONVERT_TZ(NOW(), 'UTC', `TZ`), NOW())) BETWEEN `od` AND `do` AND `dni` & (1 << DAYOFWEEK(IFNULL(CONVERT_TZ(NOW(), 'UTC', `TZ`), NOW())) - 1) = (1 << DAYOFWEEK(IFNULL(CONVERT_TZ(NOW(), 'UTC', `TZ`), NOW())) - 1);
CREATE OR REPLACE VIEW `_oPozycje` AS SELECT * FROM `_pozycje` WHERE TIME(IFNULL(CONVERT_TZ(NOW(), 'UTC', `TZ`), NOW())) BETWEEN `od` AND `do` AND `dni` & (1 << DAYOFWEEK(IFNULL(CONVERT_TZ(NOW(), 'UTC', `TZ`), NOW())) - 1) = (1 << DAYOFWEEK(IFNULL(CONVERT_TZ(NOW(), 'UTC', `TZ`), NOW())) - 1) AND `isOpen` IS NOT NULL;
CREATE OR REPLACE VIEW `_oGieldy`  AS SELECT * FROM `gieldy`   WHERE TIME(IFNULL(CONVERT_TZ(NOW(), 'UTC', `TZ`), NOW())) BETWEEN `od` AND `do` AND `dni` & (1 << DAYOFWEEK(IFNULL(CONVERT_TZ(NOW(), 'UTC', `TZ`), NOW())) - 1) = (1 << DAYOFWEEK(IFNULL(CONVERT_TZ(NOW(), 'UTC', `TZ`), NOW())) - 1);
