date()
is a PHP
function depending on your server settings. You can go around that by using the WordPress function:
current_time( 'Y-m-d H:i:s' );
This function takes the settings in wp-admin
into account.
Related Posts:
- How to get WordPress Time Zone setting?
- How to check for WordPress timezone type?
- How to get User Time Zone in WordPress?
- How to detect and handle the time difference between server and user in WordPress?
- Converting timestamps to local time with date_l18n()
- How to get year, month and hour in WordPress?
- Why does this echo values in the wrong order?
- WordPress returns a wrong date
- Unable to set right time in admin and frontend template
- Convert a date to ISO8601 date format
- I get “The PHP Date/Time library is not supported by your web host.” on my CentOS host, what library to I need to install to add support?
- wrong php date()?
- display month in french in wordpress/php?
- Is XAMPP faster than running LAMP in WSL on Windows 10? [closed]
- Displaying the Month and Year that a page was Created?
- Get date numerical and separate?
- XAMPP-VM Mac OS Mojave wordpress debugging using XDebug
- Print last modified date only on posts
- Find hours between post_date and post_date_gmt
- 3 different times on my WordPress website
- Is there any way to get a drop down list of time zones?
- Check If Post Was Published More Than 6 Months Ago Using get_the_date
- How do I check or test a WordPress Auto Year Change Script?
- Fatal error: Uncaught Error: Call to undefined function get_header() [closed]
- Shortcode function doesnt work without caption
- I installed WordPress locally now how do I login?
- Comparing Dates from custom field
- How to prevent a function from running based on host (ie web vs local)?
- Get date function not working
- PHP time function ($today) for GMT +1
- WordPress time queries
- Trying to copy linux blog locally with XAMPP – php fatal error
- Hide publish date when update date
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- call to undefined function mysql_connect
- current_time function incorrect in plugin and PHP, not in WordPress admin
- No more get_option(‘date_time’) in WordPress 5.5?
- WordPress wrong dates bug
- How to pull date/time in french format for wordpress post?
- Can’t add to time? [closed]
- Ordering / grouping posts by datepicker ACF
- Array sorting assistance
- Adding a number to a date
- Display Year and Month from custom field + Age Calculator
- Can i show items based on the day with php?
- Display Current Time using shortcode
- How do I convert a custom field to a php date format? [closed]
- Change date/time format in custom plugin
- Convert custom field date format to “WordPress default”
- Date not working correctly
- Can’t find text source file in WP theme [closed]
- What does that mean: cannot use a scalar value as an array [closed]
- Using the wp_remote_post response body
- AJAX: WordPress filters inside $html do not work as intended
- How to insert a variable into a query parameter?
- wp_link_pages return value even when is condition inside if statement
- How to edit homepage in WordPress?
- Adding Custom JQuery Menu Fresh Slide Out
- How to quickly/easily make an analysis (reverse engineering) of WordPress?
- php nested IF statements to hide content (possible syntax error) [closed]
- problem with php function error
- Errors while Loading Most Recent Version of jQuery
- Integrating CSS Into a WP Function Call [closed]
- WordPress menu links with images & class selection
- How can a ‘scripts’ directory be hooked into wp_head();?
- Use php array outside his function
- Fix incorrect related posts code snippet
- Comment section not appearing on posts with no comments
- Specific php document for a page
- HTML in PHP problem [closed]
- How to handle PHP parse errors?
- which table updated after logout?
- Implement “No related posts for this entry” into the loop?
- PHP code for link with text
- wc_add_notice not working on cart page
- Order woo products, but first products must be with acf fields
- How to convert my comment.html to comment.php
- Why not showing all post by default in my jquery filter
- php-page with db connection
- how to add display_name
- how to convert wordpress query to pdo query
- how to import contacts from php to wordpress
- Remove /category/ from category (archive) page URLs (without using a plugin)
- Accessing WordPress Functions get_permalink() in Vanilla PHP?
- Display a list of posts corresponding to a category
- How to add active class dynamically
- Gravity Forms – Prevent Multiple Form Entries Same User ID with Same Field Value
- Change background image based on tags
- How keep woocommerce users separeted in multisite install and keep admins on network
- ACF | WooCommerce | Theme Development | How to include a /template-part/ that makes use of ACF’s on a custom WooCommerce homepage?
- How to show only part of product name in category page – WordPress with woocomerce
- Setting WooCommerce currency programmatically
- Woocommerce – Shipping tax class based on cart items not using the highest tax available
- Particular meta tag – viewport – insertion when dealing with plugin
- For each loop will not append to the_content hook
- Masking external links with internal link for member-only
- Forbid certain users to access a specific page
- ACF repeater image in video poster with jquery
- Metadata on the WP_Post object
- Getting custom field data from cart page to checkout page in woocomerce [closed]