API Post date in Unix Epoch milliseconds during Daylight Savings change
Ok, after the initial shock of having to convent a simple date into Unix milliseconds format for the UTC time of 12:00 AM (good grief!), now I'm running up against it screwing up during the Dayligh Savings time changes in Fall and Spring in the U.S. During these events, the 12:00AM time becomes either 1:00AM or 11:00PM, depending on the direction of the change.
Can anyone help me out with an algo to resolve this? Is it me, or does the location of the server play into this? And whether the server time itself has already changed? And whether the date in question is BEFORE or AFTER the "Spring-forward/Fall-back" date?
The definition of UNIX timestamp is timezone independent. The timestamp is the number of seconds (or milliseconds) elapsed since an absolute point in time, midnight of Jan 1 1970 in UTC time. (UTC is Greenwich Mean Time without Daylight Savings time adjustments.)