more robust daily hour calculator, timezone issue fixed