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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:11:12+00:00 2026-06-03T09:11:12+00:00

Here is a test code: <?php ini_set(‘date.timezone’, ‘Europe/London’); $dt = new \DateTime(‘0000-00-00 00:00:00’); var_dump($dt);

  • 0

Here is a test code:

<?php

ini_set('date.timezone', 'Europe/London');    
$dt = new \DateTime('0000-00-00 00:00:00');

var_dump($dt);

This provides:

object(DateTime)[1]
  public 'date' => string '-0001-11-30 00:00:00' (length=20)
  public 'timezone_type' => int 3
  public 'timezone' => string 'Europe/London' (length=13)

Whereas this is not a valid date. I don’t understand the returned value, especially the month… can you explain?

  • 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-03T09:11:13+00:00Added an answer on June 3, 2026 at 9:11 am

    You are seeing two effects here. The first one is that you use a way of writing for a date that can be written in multiple forms:

    0000-01-01 same as  0000-01-01
    0000-01-00 same as -0001-12-31
    0000-00-01 same as -0001-12-01
    0000-00-00 same as -0001-11-30
    

    So by the date itself, you already specify the 30th November -1.

    Now there’s the time offset left that differs about the 9 minutes and 21 seconds. That is because of a change in the clock compared to UTC in Paris/France that happened 10 Mar 1911 23:51:38/39 local time.


    I modified your code example a bit and introduced the Europe/Paris setting as you have it, which is playing a role. This code is telling as well the offset in seconds from UTC (Z) which is what you’re looking for:

    $dt = new DateTime('0000-00-00 00:00:00', new DateTimeZone('Europe/Paris'));
    printf("%s secs offset from UTC\n", $dt->format('r T (e) Z'));
    

    I changed the dates a bit

    Fri, 10 Mar 1911 23:51:38 +0009 PMT (Europe/Paris) 561 secs offset from UTC
                                                       ^^^
    

    One second later:

    Fri, 10 Mar 1911 23:51:39 +0000 WET (Europe/Paris) 0 secs offset from UTC
    

    When local standard time was about to reach
    Saturday, 11 March 1911, 00:01:00 clocks were turned backward 0:09:21 hours to
    Friday, 10 March 1911, 23:51:39 local standard time instead.

    That are 561 Secs. Reference: Clock changes in Paris – Time change dates in 1911 and Time zone changes and daylight saving time start/end dates between year 1900 and 1924.

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

Sidebar

Related Questions

For example, my goal is to test the code given here: PHP script that
I'm having some hard time getting PHP APC to work. Here's my test code:
i have two files trying to use ajax here is code of test.php file
here is some C++ test code: __attribute__((visibility(hidden))) void foo() { int fd = fopen(data1,
Here is my code: public class Test { static { main(null); } public static
Here is a unit test that shows me authenticating my Nancy browser (other code
Here is the code I have... struct Test { string foo() { return bar;
All the code is inline here: http://shanxinc.com/test/fancybox2/ All I'm trying to do is get
Here is the code I'm currently using: $.ajax({ success: function(){ $('.post_container').append('test <br />'); }
Here is the code I used. library(xlsx) wb <- loadWorkbook('D:/test.xls') sheets <- getSheets(wb) sheet

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.