Implemented proper method based on datetime to find day/night cycle