How does java.sql.Date work with negative dates?
问题 I had a situation where the Java runtime returned sort of "inverted" millisecond values when reading dates from the database (in java.sql.Date ). The millisecond value was approximately the same amount of days, but counted backwards from year 0. The problem was solved by just restarting the Java runtime. But: I found out that Java handles these "inverted" values almost correctly except of the week day. When you run the following code: System.out.println(new java.util.Date(253402214400000l));