1. In the database, why can't we just use "Long" integers for dates (millis since epoch) stackoverflow.comI would like to use a Long datatype in the database to represent dates (as millis since epoch). The reason why, is that storing dates is so complex with the jdbc ... |
2. SQL dates, seconds since epoch and GMT/BST differences coderanch.comHi all, I've got some code which takes a date or a date/time combination in a String, parses it and creates SQL dates and times. However it seems to produce incorrect results based on GMT and BST differences; package com.ms.mcparlan.dates; import java.sql.Date; import java.sql.Timestamp; import java.text.ParsePosition; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; /** * Tests the formatting of SQL dates * ... |