How to add country specific time?

Support General How to add country specific time?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #39642
    sharebiology@gmail.com[email protected]
    Participant

    Hello,

    I am working on a job listing site using Metabox. For the expiry date, I would like to add a time zone for the DateTime field. How can I do it?

    Thanks

    #39676
    PeterPeter
    Moderator

    Hello there,

    The timezone is added to the value of the date or datetime field if you use the setting timestamp. Please read more on the documentation https://docs.metabox.io/fields/datetime/#settings

    This field gets the current time of your local computer and converts it to the timestamp value. So the Unix timestamp saved is the "timezone (UTC) + offset".

    #39728
    sharebiology@gmail.com[email protected]
    Participant

    Hi,

    Thanks for providing the solution. I am a non-coder, so let me explain what I understood from your reply.
    For example, if the job posting's last date is 13th December 2022, for a position in the USA. Since I am posting it from India, first I need to recalculate what would be date and time in India and the date and time should be entered as such. But, because I have opted for 'save time value as time stamp', even after me adding the last date according to India time, for a user viewing from the US would be accurate. because the option calculates the difference and shows the modified time.

    Did I get it right?

    now the question is, does this calculation get affected by VPN?

    ---------------------------

    another question: is there any way to show a countdown timer based on this value?

    Thanks in advance

    #39782
    PeterPeter
    Moderator

    Hello,

    Yes, the time will be saved to the database with the India timezone. I do not have a VPN to test, if you have one please test this on your own.

    Meta Box does not support a countdown timer field, you can use a third party plugin such as https://wordpress.org/plugins/widget-countdown/
    to display a countdown on your site.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.