Fixed some time queries - fixed calendar freeze

Signed-off-by: Sovak <Sovak007@gmail.com>