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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:11:24+00:00 2026-05-26T09:11:24+00:00

On some occasions data() is converting my dates incorrectly. My date formats look like

  • 0

On some occasions data() is converting my dates incorrectly.

My date formats look like so:
Fri Oct 25 15:00:00 EDT 2011

The date string comes from an external source, so I’m unable to change the format.

// output incorrect - Fri, 28 Oct 2011 15:00:00 -0400
date("r", strtotime("Fri Oct 25 15:00:00 EDT 2011"))

// output correct - Fri, 21 Oct 2011 15:00:00 -0400
date("r", strtotime("Fri Oct 21 15:00:00 EDT 2011"))

I can’t figure out why just changing the day makes it fail to convert.

My end goal is to create a DateTime object but it suffers from the same problem.

// output - Fri Oct 28 19:00:00 EDT 2011
DateTime("Fri Oct 22 19:00:00 EDT 2011")
  • 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-26T09:11:25+00:00Added an answer on May 26, 2026 at 9:11 am

    Oct 25/2011 is a tuesday. Strtotime is interpreting your date string as “what’s the next friday AFTER Oct 25th”, and is returning (what it thinks) is the correct answer: October 28th.

    So, the GIGO rule applies. You’re feeding in garbage, and wondering why you’re getting garbage out.

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

Sidebar

Related Questions

Some web applications, like Google Docs, store data generated by the users. Data that
I've got some data up on Google App Engine's live datastore, but would like
I've found that on some occasions I can edit the source while debugging. Are
As you may know, in many occasions, there is a need to flag some
Some WPF controls (like the Button ) seem to happily consume all the available
Some things look strange to me: What is the distinction between 0.0.0.0, 127.0.0.1, and
I was going to use XML for communicating some data betwwen my server and
I am reading a million plus files to scrape out some data. The files
I'm trying to pull some binary data from a database and write them to
Fixed it. $data = base64_decode(str_replace(' ', '+', $_GET['data'])); for whatever reason, Php was converting

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.