Hi All
Would somebody be kind enough to explain the timestamp format for me please?
Say I am trying to get the Orders from midnight on the first of jan though to today what would be the time stamp for both dates
Thanks in anticipation
Andy
Hi All
Would somebody be kind enough to explain the timestamp format for me please?
Say I am trying to get the Orders from midnight on the first of jan though to today what would be the time stamp for both dates
Thanks in anticipation
Andy
The format is called "epoch time". It counts the number of seconds that have elapsed since Jan 1st 1970. If you google "epoch converter", the first result is a very useful tool that will probably help explain more. (http://www.epochconverter.com/)
That website is useful for having a few dates to test with, but when you need to convert within your program, it obviously depends on which language or platform you are using (e.g. Android/Windows Service/Web App) as to how you achieve this.
The format is a Javascript date/time stamp in long format. The first answer is correct for epoch time. However the format used by javascript is actually the number of milliseconds since Jan 1, 1970. Since the clover devices have a time resolution in seconds, not milliseconds, you will usually see all of the date/time stamps ending with three zeros.
If you want an online tool to quickly convert these long integers into a date/time that you can read, check out TimeStampConvert.com. It will also allow you to enter date/time stamps in a human readable format and convert them to epoch time or javascript time (aka Unix timestamp)
Why does clover use milliseconds? Well, I'm not a clover dev, but I suspect the logic behind this is pretty simple. Clover is returning data in JSON format, so it only makes sense to return date/time stamps in javascript format also.
No one has followed this question yet.