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 238153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:28:58+00:00 2026-05-11T20:28:58+00:00

I have a server which is set to EST, and all records in the

  • 0

I have a server which is set to EST, and all records in the database are set to EST. I would like to know how to set it to GMT. I want to offer a time zone option to my users.

  • 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-11T20:28:58+00:00Added an answer on May 11, 2026 at 8:28 pm

    No matter in which GMT time zone the server is, here is an extremely easy way to get time and date for any time zone. This is done with the time() and gmdate() functions. The gmdate() function normally gives us GMT time, but by doing a trick with the time() function we can get GMT+N or GMT-N, meaning we can get the time for any GMT time zone.

    For example, if you have to get the time for GMT+5, you can do it as follows

    <?php 
      $offset=5*60*60; //converting 5 hours to seconds.
      $dateFormat="d-m-Y H:i";
      $timeNdate=gmdate($dateFormat, time()+$offset);
    ?>
    

    Now if you have to get the time for GMT-5, you can just subtract the offset from the time() instead of adding to it, like in the following example where we are getting the time for GMT-4

    <?php 
      $offset=4*60*60; //converting 4 hours to seconds.
      $dateFormat="d-m-Y H:i"; //set the date format
      $timeNdate=gmdate($dateFormat, time()-$offset); //get GMT date - 4
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm somewhat stuck. We have a database server which was set up and configured
Hi I have a server which has several virtual hosts set up on it.
I have set up 2 servers which are linked. From my LOCAL SERVER, I
I have a server application which I want to protect from being stopped by
I have a server program which should run full time a day. If I
I have a database (SQL server express 2008) which has a column that is
I am creating an object server-side which is to have all of the data
I have a thttpd server set-up which has the following html file. When I
I have a basic page set up online on my server which processes Post
I have set up a WCF service on a server which lives in its

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.