The time is based on your pc clock. If you're playing at 11 am, then it's daytime, but if you're playing at 11pm, then it's night. If you want to catch a pokemon that only appears at night, you should change the clock on your pc, play the game and then revert the time.