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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:30:42+00:00 2026-05-23T08:30:42+00:00

Date date = new Date(0L); Shouldn’t it give me a zero date? Like 00/00/0000?

  • 0
Date date = new Date(0L);

Shouldn’t it give me a zero date? Like 00/00/0000? Gives me Wed Dec 31 19:00:00 EST 1969

  • 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-23T08:30:43+00:00Added an answer on May 23, 2026 at 8:30 am

    Per the javadocs, this constructor on Date uses an offset from baseline time:

    Allocates a Date object and
    initializes it to represent the
    specified number of milliseconds since
    the standard base time known as “the
    epoch”, namely January 1, 1970,
    00:00:00 GMT.

    Presumably you are on EST, hence the result.

    As an aside, I would not expect the result you noted to be produced by any conceivable Date manipulation, since that’s not even a valid date (month and day = 0).

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

Sidebar

Related Questions

when using new Date,I get something like follows: Fri May 29 2009 22:39:02 GMT+0800
new Date(05-MAY-09 03.55.50) is any thing wrong with this ? i am getting illegalArgumentException
today1 = new Date(); today2 = Date.parse(2008-28-10); To compare the time (millisecond) values of
var date = new Date();//Mon Mar 15 2010 12:40:05 GMT+0300 (MSK) var omg =
Case One: new Date(Date.parse(Jul 8, 2005)); Output: Fri Jul 08 2005 00:00:00 GMT-0700 (PST)
interval = new Date(0); return interval.getHours(); The above returns 16. I expect it to
I used a new Date() object to fill a field in a MySQL DB,
I love the new DATE datatype in SQL Server 2008, but when I compare
When initializing a new Date object in JavaScript using the below call, I found
When I create a new Date object, it is initialized to the current time

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.