--- title: GeolocationPosition.timestamp slug: Web/API/GeolocationPosition/timestamp translation_of: Web/API/GeolocationPosition/timestamp original_slug: Web/API/GeolocationPosition/获取该位置时的时间戳 ---
The GeolocationPosition.timestamp
read-only property returns a {{domxref("DOMTimeStamp")}} object, represents the date and the time of the creation of the {{domxref("GeolocationPosition")}} object it belongs to. The precision is to the millisecond.
var timestamp = geolocationPositionInstance.timestamp
A {{domxref("DOMTimeStamp")}} object instance.
Specification | Status | Comment |
---|---|---|
{{SpecName('Geolocation', '#dom-geolocationposition-timestamp', 'GeolocationPosition.timestamp')}} | {{Spec2('Geolocation')}} | Initial definition |
{{Compat("api.GeolocationPosition.timestamp")}}