You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 8, 2025. It is now read-only.
Note that if 'raw' units are requested then this parameter has no effect on the speed data, as it is left untouched from what was read-in from the file.
265
267
268
+
####Timestamps
269
+
Unix time is the number of seconds since UTC 00:00:00 Jan 01 1970, however the FIT standard specifies that fields of type date_time and local_date_time (e.g. timestamps) are unsigned long integers representing seconds since UTC 00:00 Dec 31 1989.
270
+
271
+
The difference (in seconds) between FIT and Unix timestamps is 631,065,600:
272
+
```php
273
+
$date_FIT = new DateTime('1989-12-31 00:00:00', new DateTimeZone('UTC'));
274
+
$date_UNIX = new DateTime('1970-01-01 00:00:00', new DateTimeZone('UTC'));
echo 'The difference (in seconds) between FIT and Unix timestamps is '. number_format($diff);
277
+
```
278
+
By default, fields of type date_time and local_date_time read from FIT files will have this delta added to them so that they can be treated as Unix time. If the FIT timestamp is required, the 'garmin_timestamps' option can be set to true.
279
+
266
280
##Analysis
267
281
The following functions return arrays of that could be used to create tables/charts:
0 commit comments