I am currently working on a PHP project and I came across the gmmktime() function. I am a bit confused about how it works and would greatly appreciate if someone could help me out.
I have seen that the gmmktime() function is used to get the Unix timestamp for a specific date and time - that part I understand. But I am not quite sure about the parameters it expects and how to use it correctly.
If I understand correctly, gmmktime() takes in the arguments for hour, minute, second, month, day, and year. My question is, in what format should I provide these values? Should they be in 24-hour format or 12-hour format with AM/PM? Also, is it mandatory to provide values for all the parameters, or can I leave some of them blank?
I would really appreciate it if someone can provide me with a simple example code snippet demonstrating the usage of gmmktime(). It would be even better if you could explain how to retrieve the Unix timestamp for a specific date and time, let's say January 1, 2022, at 8:30 AM UTC.
Thank you so much for your help!