They have a rule on the island which states that if a dragon ever finds out that he/she has green eyes, then at precisely midnight on the day of this discovery, he/she must relinquish all dragon powers and transform into a long-tailed sparrow.
Midnight is the first part of any day. So if they find out later in the day, they would have already turned into sparrows.