JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Can timestamp fields (e.g., submission date) contain leap seconds?Asked by philbert on July 11, 2016 at 05:55 PM
A leap second can occur only at the end of a day. If there were a leap second at the end of today, for example, the ISO timestamp for a form submitted at that exact time would be
That is, the "second" would exceed 59.
Some database and spreadsheet systems will reject such a timestamp as being invalid. Others will happily take it in stride. Programmers working with the former will need to know, and will have to implement a suitable workaround for handling such timestamps smoothly (e.g., capping the "seconds" at 59).
With a new leap second coming up, it seemed worth asking.
I think that the leap seconds are returned with a time stamp that ends with :59 in our system.
It should not be a problem unless I am missing something.
If you need any further assistance, please let us know.
Thanks for the quick response.
To summarize your answer, JotForm maps the :60 back to :59, as if the leap second never happened.
In theory, this could make it impossible to determine which of two forms came in last. But given that the data originates from human beings, this small additional timing uncertainty is probably not meaningful.
On the software-error-prevention front, unfortunately, until I get a more definitive answer than "I think", I'm going to have to go forward on the possibility that :60 will be returned in this case.
That may be wise, anyway. Data policies are always subject to change without my noticing. ;-)
As my colleague explained this seems to be the case, time is currently taken like: 2016-07-11 23:59:59
As I can understand you want to get the time in a format like this: 2016-07-11 23:59:60
Could you please confirm us that?
So we can escalate this thread to our second level, so we should get an answer from our developers about this.
But, please do confirm us that, we will be glad to assist you.
No, Kevin. I'm not going to confirm that. What I requested was not change, but information.
I'm writing a program that receives data originating from JotForm. I was trying to find out, definitively, how JotForm reports events that occurred during a leap second. I did not find out, definitively. "I think" and "seems to be" are anything but definitive.
But I soon realized it doesn't matter, for several reasons, as I pointed out in my reply.
Ultimately, no matter how JotForm (or anyone else) reports leap seconds, the code I'm writing will have to be bulletproof. Whether it receives leap seconds by design or by accident, it will have to handle them. Without passing leap seconds on to things that can't handle them. That's not your job; that's mine.
So if I'm doing my job right, your answer no longer matters. You don't need to do anything more.
I understand what you mean. I do not have a right answer for you since I do not have access to the code and our servers infrastructure. However, I have never heard about any issues caused by the leap seconds at JotForm, and based on the database type that we used I assume that we do not include the leap seconds.
We can forward a ticket to our developers in order to get this checked by someone, but this is not likely that they will look into this asap. They are usually pretty busy with their projects.
We are sorry for the inconveniences in this matter.