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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Per the javadocs, this constructor on
Dateuses an offset from baseline time: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
Datemanipulation, since that’s not even a valid date (month and day = 0).