Since WordPress is a server-side framework/CMS, it likely doesn’t have the functionality you’re looking for. If you’re looking for ways to obtain this information, the most reliable would likely be to ask the user.
To make it as painless as possible for the user, this functionality could be achieved via client-side scripting (ie. JavaScript) where you attempt to infer the user’s timezone:
-new Date().getTimezoneOffset()/60;
And then ask the user to confirm that it is the correct timezone. Keep in mind, client side code is run on the user’s machine and can be disabled entirely.
Related Posts:
- display month in french in wordpress/php?
- Can’t add to time? [closed]
- How to get WordPress Time Zone setting?
- PHP function showing wrong time in WordPress
- Date, Time, and Timezones
- WordPress returns a wrong date
- How to check for WordPress timezone type?
- Unable to set right time in admin and frontend template
- Get date numerical and separate?
- Print last modified date only on posts
- Get date function not working
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- How to detect and handle the time difference between server and user in WordPress?
- current_time function incorrect in plugin and PHP, not in WordPress admin
- WordPress wrong dates bug
- Timezone for Plugin
- How to get Unix Local Time?
- Adding a number to a date
- Display Year and Month from custom field + Age Calculator
- Convert custom field date format to “WordPress default”
- Calculate business days
- the_date() not working
- Converting timestamps to local time with date_l18n()
- Why time functions show invalid time zone when using ‘c’ time format?
- Converting Unix timestamp to wordpress date
- How to get year, month and hour in WordPress?
- Is it safe to use ‘date_default_timezone_set’ in plugin file?
- Archive listing of posts by publish year (multiple years)
- Why does this echo values in the wrong order?
- Serve visitor post time adjusted to their timezone
- WP_Query meta_query results date by date
- filter date and time to differents time zone
- 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()?
- Way to display “Yesterday”, “Today”
- WordPress outputs mm/dd but it should be opposite
- date() returns incorrect value if used from WordPress theme, but correct otherwise
- How to get date using timezone saved in options? [duplicate]
- timestamp and scheduled post irregularities
- Customize Time Stamp
- Displaying the Month and Year that a page was Created?
- Adding number to date not working [closed]
- Set meta field to publish date + 2 weeks
- Make WordPress use timezone for email Date header
- How to manually change current date to post date in frontend?
- Translate current_time
- Convert WordPress date format to jQuery UI Datepicker format
- Converting Y-m-d to a date with a Month name? [closed]
- 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?
- How would I use this filter to change the output of the date format to “Twitter time”?
- 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?
- Function Reference/human time diff for future posts
- Shortcode function doesnt work without caption
- Using php inside javascript [closed]
- Comparing Dates from custom field
- How to get movies by date
- PHP time function ($today) for GMT +1
- WordPress time queries
- Is there way to toggle the publish date display?
- Hide publish date when update date
- Issue in displaying the ongoing event and current events in the post
- No more get_option(‘date_time’) in WordPress 5.5?
- Time Stamp In A WordPress Post Title That Does Not Keep Refreshing
- Learndash: Customize user enroll time
- Don’t update modified post date when user add a product review or comment?
- Possible to edit custom date field and display?
- Get posts from year from URL
- Changing Date Format on Custom Meta Data w/shortcode call
- Count time from registration date to today
- Update existing post times to random times?
- Primary navigation menu with timed items from custom post type
- How to pull date/time in french format for wordpress post?
- Grouping posts by date
- WordPress change post date format from english to japanese
- Ordering / grouping posts by datepicker ACF
- Comparing Dates within plugin using PHP If statement
- Array sorting assistance
- Get current week’s day and time outside the loop
- How to second orderby in “pre_get_posts” by meta value or combine single date and time to timestamp
- Can i show items based on the day with php?
- Get system timestamp in wordpress
- Can someone explain why wordpress uses two column for storing time values?
- 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
- Remove css styles from specific page
- Submitting form via admin-post.php and handling errors
- Custom plugin issue when trying to use the shortcode twice on a page [closed]
- Custom Loop through category menu to include sub categories
- LESS compiler for WordPress
- Secondary navigation menu on one page
- Site throws 500 error after upgrading from PHP 5.6 to 7.X
- Woocommerce. Get a list of products in the current category on the archive page and product page
- remove_action from parent theme using child theme functions.php
- “Missing header/body separator” error with wp_remote_post()
- Using Featured Image as Hero Background in Word Press