Hi,

mktime returns date in UNIXTIMESTAMP format & it's 10 digit long.

I just want to know that Is UNIXTIMESTAMP is always 10 digit long or it can be less than 10 digits or more than digits in other cases.

Thanks in advance for your consideration 🙂

Jimmy

    The timestamp is a number, and hence it can even be just one digit. It is likely dependent on the range of C's time_t on the given system, so you can expect it to have maximum ceil(n lg2) digits on an n-bit system (e.g., 10 digits on 32-bit systems, 20 digits on 64-bit systems).

      What is the unix time stamp?

      The unix time stamp is a way to track time as a running total of seconds. This count starts at the Unix Epoch on January 1st, 1970. Therefore, the unix time stamp is merely the number of seconds between a particular date and the Unix Epoch. This is very useful to computer systems for tracking and sorting dated information in dynamic and distributed applications both online and client side.

      What happens on January 19, 2038?

      On this date the Unix Time Stamp will cease to work due to a 32-bit overflow. Before this moment millions of applications will need to either adopt a new convention for time stamps or be migrated to 64-bit systems which will buy the time stamp a "bit" more time.
        Roger Ramjet wrote:

        ... or be migrated to 64-bit systems which will buy the time stamp a "bit" more time.

        A "bit" in this case means we'll have to migrate to 128-bit systems some time before 4 December 292,277,026,596. 😉

          im not looking forward to December 31, 17,014,118,346,046,923,173,168,730,371,588,410 then.

            When possible, I use date format such as YYYY-MM-DD... MySQL has lots of date functions that work with that format 😃

              Write a Reply...