PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I prefer binary timestamps i.e. int(11) .. basicaly stored unix-timestamp, versus the database's versions.. but I write for multiple architectures.. so...
But I could not make out much from it because I have not worked with different architectures.
differing architectures store time in their own formats. When a selection is made, it often has to be displayed in a different format. To simplify the need to ask the database to convert it back to a usable format (especially when it needs to be used multiple times in a single page, for different purposes) becomes a pain. It's just easier to store it in a known, usable format, and start from there.
feyd wrote:differing architectures store time in their own formats. When a selection is made, it often has to be displayed in a different format. To simplify the need to ask the database to convert it back to a usable format (especially when it needs to be used multiple times in a single page, for different purposes) becomes a pain. It's just easier to store it in a known, usable format, and start from there.
you mean to say all architectures understand / use Unix format so when using PHP in different architectures you can use it directly without the need for conversion???
you mean to say all architectures understand / use Unix format so when using PHP in different architectures you can use it directly without the need for conversion???
Unix timestaps are plain integers... and yes, all widely used architectures are able to use integers
you mean to say all architectures understand / use Unix format so when using PHP in different architectures you can use it directly without the need for conversion???
Unix timestaps are plain integers... and yes, all widely used architectures are able to use integers
what about the normal timestamp(14) format: YYYYMMDDHHMMSS ; they are also integers and they should also be read by all architectures...i am still confused...
that's not an integer. It may look it, but it isn't.
It will behave differently across architectures. For instance, in TransactSQL a timestamp is really a datetime, not the timestamp defined in the standard.