This thread, good definition of irony.

I prefer windows 8 to other version of windows. Custom KDE over Gnome. I do not like the fractured file system that Linux defaults to for program installations. Nor do I like most Linux fonts. XP was dead to me before this post even started, before that I had xp64.

In the end, there are a lot of suggested approaches. A db is a heavy handed solution, imo, but it would also work. Regardless, I think the original question has been answered quite thoroughly.

Ah, a chat system. If you are using a single server(the most likely scenario), then you use that server's time.

You then make a client that each user would use to connect to the server. (a browser page for example) Any message must first be sent to the server, and then the server send it to the client (and a confirmation back to the original sender for their timestamp. The clients can then set the local time zone however you want to let them.

Another option is to not use a server and let each client set the time stamp for when it displays the message. The only potential drawback, is that two separate clients might have different timestamps for the same conversation. This is the easier approach.

One thing to note for a client application - unless run through browser requests, PHP is not a wonderful for installing on client boxes.

Added note: I think this was described, but you could also request the current time from a SQL server.

It depends on what you want as a source of truth for time. Using an alternate time source isn't a trivial problem. An easier approach that I would recommend, and use myself, is to keep the server/computer time synced and then just use the server/computer time inside of PHP.

Unfortunately, I don't know of any specific time servers or time applications to recommend