Get the Timezone Abbreviation in WordPress

Say you want to display a time in WordPress like July 4, 2024 12:34 PM EDT.

It’s easy enough to get times and dates with WordPress and PHP itself, but what about the timezone? In our example above, that’s EDT, i.e. Eastern Daylight Savings Time. As opposed to EST, which is Eastern Standard Time,

Anyway, the code…