1

I've been creating kml files for a while now, using TimeStamps so that I can use the time scaling control. It used to be that times specified as UTC (with a 'Z' character at the end) would not be changed by Google Earth. They've apparently changed their approach and now adjust the UTC time to the local time of wherever a Placemark is located. For example:

<Placemark>
  <name>1324</name>
  <description>Local time: 13:50:12</description>
  <Point>
    <altitudeMode>relativeToGround</altitudeMode>
    <coordinates>-79.344437,43.679943,0</coordinates>
  </Point>
  <TimeStamp><when>2012-09-26T13:50:12Z</when></TimeStamp>
</Placemark>

This location is set to 13:50:12 (1:50:12 PM), but will appear in the time slider control as 08:50:12, the "adjusted" local time for Toronto (North American Eastern Time Zone). I tried different formats for the timestamp:

<TimeStamp><when>2012-09-26T13:50:12Z</when></TimeStamp>
<TimeStamp><when>2012-09-26T13:50:12</when></TimeStamp>
<TimeStamp><when>2012-09-26T13:50:12+00:00</when></TimeStamp>
<TimeStamp><when>2012-09-26T13:50:12-00:00</when></TimeStamp>

And only specifying the offset (which I want to avoid) makes Google Earth give out the correct time:

<TimeStamp><when>2012-09-26T13:50:12-05:00</when></TimeStamp>

What is the format (if any) to tell Google Earth to ignore the timezone, to basically not adjust times?

Add-on: Working example at http://pastebin.com/DahChjsT, save as .kml and open.

Using latest version of free Google Earth, 7.0.1.8244 (beta)

4

1 に答える 1

2

I assume you are talking about the desktop version of Google Earth and not the web based API. That being said, if you make the time stamps with the normal Z notation, the time slider bar will appear and if you click the wrench on the slider it brings up the time options and you can select UTC as the time you want to use. This seems to stick when closing and re-opening the program. Hope that helps.

于 2014-11-04T16:48:35.627 に答える