Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4088496
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:59:24+00:00 2026-05-20T18:59:24+00:00

I have a dropdown box on a webpage that takes a timezone identifier as

  • 0

I have a dropdown box on a webpage that takes a timezone identifier as the value (however I can change it to save the GMT offset if that is a better choice). Currently a user would be saving something like “America/Denver” as his / her time zone.

I need to convert a unix timestamp into the user’s local time for display in another portion of the page. What is the best way to accomplish this?

Would it be better to store the GMT offset in the database and use that for a time calculation? Can someone please point me in the right direction here?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:59:24+00:00Added an answer on May 20, 2026 at 6:59 pm

    The easiest approach would be to use DateTime with:

    $t = new DateTime();
    $t->setTimestamp( $time=time() );
    $t->setTimeZone(new DateTimeZone("America/Denver"));
    print $t->format(DateTime::RFC850);
    

    The timezone can be changed at will to cause the format function to recalculate the local time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Seleniunm to test my webpage. I have a dropdown box that I
I have three values I need to align in a dropdown box. How can
I have a PHP registration that calls a mysql db for a dropdown box.
I have dropdown menu..which is dynamic.. How can get value of the last item
I have a dropdown list that stores name/value pairs. The dropdown appears in each
I have an Options box that hovers in the top right of the webpage.
I have a dropdown box that I construct with PHP. Here is the code:
I have a dropdown list box that displays data from my database. Problem is
I have a dropdown box that has a list of institutions in it. Now
I have created one dropdown box <select name=select id=selectId> <option id= value=calendar_Second_Calendar_1285942672.xml>Second Calendar</option> <option

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.