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

  • Home
  • SEARCH
  • 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 7622303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:25:03+00:00 2026-05-31T04:25:03+00:00

In my web app, I let the users choose their preferred timezone from a

  • 0

In my web app, I let the users choose their preferred timezone from a list (that contains all timezones that PHP supports).

Let’s say that $_POST['timezone'] is the chosen timezone (e.g. America/New_York).
I set it with the following code which produces no errors:

default_date_timezone_set($_POST['timezone']);

But when I reload the page it goes back to what it was before (e.g. Europe/Moscow).
Do I have to set the default timezone in every script or isn’t the function (default_date_timezone_set) working properly?
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-31T04:25:05+00:00Added an answer on May 31, 2026 at 4:25 am

    This function changes the timezone for the execution of the script only.
    You could store the timezone in a session variable and set the time zone on top of every page.

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

Sidebar

Related Questions

So I'm working on this site web app that should let users easily chat
I'm writing an app with a feature that will let the user choose from
Let's say my web app is acting on behalf of users who give their
How can I let users log in to my web app with their Google
I have a lock in my c# web app that prevents users from running
I'm trying to develop a web app with Django that would let users to
I'm working on a web app for my company that will let us do
Let's say I have a list of categories for navigation on a web app.
I'm currently building a web app that will take some info from a database
For a web app I want to let users review and edit a record

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.