Can 'good morning' be used to wish someone we meet 1st time?


(Guest)

 

Can 'good morning' be used to wish someone we meet first time in a day irrespective of time?

x meets y at 6pm in a day for the first time on that particular day.
how should he greet y
good morning or
good evening