I am using strtotime("first day of this month", time());
to get the start of the current month, strtotime("midnight", time());
to get the start of the current day. Now I want to get the start of the current hour.
strtotime("last hour", time());
gives me the current hour, minus 1.
Looking at the docs, I see that you can build expressions to get the times you want, however, I have tried several and I am stuck. "First sec of this hour" or "first second of this hour" and "this hour" (same as "now") all give me incorrect values.
How would I go about getting the timestamp of the first moment of the current hour using strtotime
?