Hi, I have read that you can use Good bye only when you are going away and that you can't use it when you meet people. But if you happen to meet someone you want to greet and you don't know him/her well. It's night. How do you say? Do you skip the person? If you say Hi, Hello you are informal; Do you say good evening, it doesn't matter what time it is? ( 22:00; 23:00 and so on?)
'Good evening' is good any time after it starts getting dark. If it's earlier, use 'good afternoon'. Both of these also work for 'good bye' at the same appropriate times (though they are a bit formal). 'Good morning' works any time after about 3 a.m., depending somewhat on who has been up all night and who's been sleeping. 'Good night' and 'good bye' only work when you are leaving.