Skip to content

Instantly share code, notes, and snippets.

@digisavvy
Created June 3, 2023 16:56
Show Gist options
  • Save digisavvy/711319a9bec9da4fd9f5055fa176c99d to your computer and use it in GitHub Desktop.
Save digisavvy/711319a9bec9da4fd9f5055fa176c99d to your computer and use it in GitHub Desktop.
<?php
function dgs_function_with_current_time() {
// Get the current date and time based on your WordPress settings
// 'Y-m-d H:i:s' will return the date and time in 'YYYY-MM-DD HH:MM:SS' format
return current_time('Y-m-d H:i:s');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment