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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:09:31+00:00 2026-06-15T12:09:31+00:00

Is it possible to have something like? $offset = -05:00; $timezone = getTimeZone($offset); //return

  • 0

Is it possible to have something like?

$offset    = -05:00; 
$timezone  = getTimeZone($offset); //return America/New_York 
date_default_timezone_set($timezone);

How about the DST(Day Saving Light) if yes?

EDIT

What i have tried is

function php_date_default_timezone_set($GMT,$timestamp) { 
              $timezones = array( 
                  '-12:00'=>'Pacific/Kwajalein', 
                  '-11:00'=>'Pacific/Samoa', 
                  '-10:00'=>'Pacific/Honolulu', 
                  '-09:00'=>'America/Juneau', 
                  '-08:00'=>'America/Los_Angeles', 
                  '-07:00'=>'America/Denver', 
                  '-06:00'=>'America/Mexico_City', 
                  '-05:00'=>'America/New_York', 
                  '-04:00'=>'America/Caracas', 
                  '-03:30'=>'America/St_Johns', 
                  '-03:00'=>'America/Argentina/Buenos_Aires', 
                  '-02:00'=>'Atlantic/Azores',
                  '-01:00'=>'Atlantic/Azores', 
                  '+00:00'=>'Europe/London', 
                  '+01:00'=>'Europe/Paris', 
                  '+02:00'=>'Europe/Helsinki', 
                  '+03:00'=>'Europe/Moscow', 
                  '+03:30'=>'Asia/Tehran', 
                  '+04:00'=>'Asia/Baku', 
                  '+04:30'=>'Asia/Kabul', 
                  '+05:00'=>'Asia/Karachi', 
                  '+05:30'=>'Asia/Calcutta', 
                  '+06:00'=>'Asia/Colombo', 
                  '+07:00'=>'Asia/Bangkok', 
                  '+08:00'=>'Asia/Singapore', 
                  '+09:00'=>'Asia/Tokyo', 
                  '+09:00'=>'Australia/Darwin', 
                  '+10:00'=>'Pacific/Guam', 
                  '+11:00'=>'Asia/Magadan', 
                  '+12:00'=>'Asia/Kamchatka' 
              ); 

    date_default_timezone_set($timezones[$GMT]);

    return  date_default_timezone_get();
}  

    echo php_date_default_timezone_set('-05:00',time()); 
   // returns America/New_York

But i don’t know whether this way is correct or not?

  • 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-06-15T12:09:32+00:00Added an answer on June 15, 2026 at 12:09 pm

    No, because there’s no such reverse correlation. There are many timezones which currently have a -05:00 offset. That’s why you should use timezone identifiers to identify timezones, not offsets.

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

Sidebar

Related Questions

Is it possible to have something like Data Grid or Grid View control in
If i have something like <p id=something>My Text Here</p> Is it possible to use
Is something like this possible: I have a flash animation of a glowing orb.
Possible Duplicate: C printing bits Lets say I have a uint16_t number something like:
I have Comments for something and it's possible to like them. The likes are
I was wondering if it's possible to have something like a try, catch, finally
Is it possible to have something like AttributeUsage to restrict the use of an
Is it possible to have something like global area which would be displayed in
Is it possible to have something like ContactAddress.Contact in LINQ without creating a foreign
I was just wondering whether its possible to have something like this: I have

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.