There are many examples of poor grammar, punctuation and vocabulary on the internet, so you must be wary when using Google to find answers.
The possessive form (3 months' time) is the correct practice. 'The time' = 3 months; it is 3 months' worth of time, or the time 'belonging to' 3 months.