PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
But I have a question. If I set the timezone to GMT, I still have to rely on my server time for reference. If my server time changes, my output will be different.
I am looking for a way which will give me the current GMT time even if my server time is different.
For eg. If my server time is 1st Jan 2004 00:00:00, I still want some way by which the current GMT time is fetched.
I don't think there's a way to get GMT time without relying on the system clock. You may be able to use a web service, but there's no built-in PHP function for getting a date without relying on the system clock somewhat.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
pickle wrote:I don't think there's a way to get GMT time without relying on the system clock. You may be able to use a web service, but there's no built-in PHP function for getting a date without relying on the system clock somewhat.
I have a function that does just that: not a web service, but (even better) a time server.