Fixed DST detection (used old Prototype code)