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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:44:45+00:00 2026-05-16T22:44:45+00:00

Columbus, Ohio is in EDT timezone but PHP::DateTime uses these php timezones and I

  • 0

Columbus, Ohio is in EDT timezone but PHP::DateTime uses these php timezones and I cannot seem to find one that gives me correct time. America/New_York is off by an hour because until EDT ends we are +5 not 4.

I am confused. For example right now its 11:26AM roughly speaking and I get back 10:26AM. The server has the right time set on it, I tried using date_default_timezone_set(“EDT”) but this is not allowed.

$fromZone = 'Europe/London'; 
$toZone = 'American/New_York';
function adjustTime($time, $fromZone, $toZone){
 $date = new DateTime($time, new DateTimeZone($fromZone)); 
 $date->setTimezone(new DateTimeZone($toZone));
 return $date->format('Y-m-d H:i:s'); 
}

For example: I receive from a soap web service “2010-09-23 15:25:56” which is Europe/London time and it should be transformed to “2010-09-23 11:25:56” which is EDT time. I was trying to use the function above and this is returning back “2010-09-23 10:25:56”

  • 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-16T22:44:45+00:00Added an answer on May 16, 2026 at 10:44 pm

    “America/New_York” should give you the right value, given that at the time of this writing it’s 11.36 in New York too. Note that that’s UTC-4 (it’s currently 15:35 UTC). In standard time, you’re UTC-5.

    EDT isn’t really a “full” time zone – it’s just the daylight part of it. A time zone name like “America/New_York” gives the complete time zone implementation.

    Now as to why your server is giving the wrong value, that’s a different matter… if you ask for the UTC time, what does it give you?

    EDIT: As mentioned in the comments, the fix is to convert from UTC, not from Europe/London:

    $date = new DateTime($time, new DateTimeZone('UTC'))
    

    (There may be a better way of doing it; I’m not a PHP developer.)

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

Sidebar

Related Questions

On my website I allow users to search for things such as 'Columbus Ohio',
I'm new to LINQ to XML and I have been looking at tutorials but
I'm trying to use net/http to interact w/ the Yahoo Placemaker API but I
<EFM> <projects> <project name=EFM Columbus Supply Chain Project> <characteristics> <characteristic name=Types of Data> <textDescription></textDescription>
I'm trying to develop an application that will simulate a route through Google's Navigation
I have a PHP Array of Cities and States. I want the end result
So I have the following PHP string: $output = {playerId:1178,percentChange:0.1,averageDraftPosition:260,percentOwned:0.1,mostRecentNews:{news:Accardo was called up from
I am working on a project which features one database table looking like this
I have a JSON string(?) that I have returned from $.ajax() and named it
I have a PHP array I want to pass to my jquery (replace the

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.