Title: Time Zone issue
Last modified: October 19, 2018

---

# Time Zone issue

 *  [pedjas](https://wordpress.org/support/users/pedjas/)
 * (@pedjas)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/time-zone-issue-10/)
 * While using OruxMaps on with Trackserver in live mode I noticed that time for
   accepted tracks is shown in offset to proper time.
 * I am in +2 time zone. Android devices is set accordingly. OruxMaps Force UTM 
   zone is set to 0, meaning leave it as is. WordPress is set to UTC+2 and hosting
   server is set to TZ Europe/Belgrade (which is UTC+2).
 * Track is saved in GPX file which shows track point with time 15:12 (UTC).
 * <time>2018-10-19T15:12:13Z</time>
 * That is ok.
 * But, Trackserver displays track point time as 10:11 instead of 17:11 as it should
   be.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [wolfgang61](https://wordpress.org/support/users/wolfgang61/)
 * (@wolfgang61)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/time-zone-issue-10/#post-10799153)
 * Not a solution but maybe some hints:
 * The GPX 1.1 xml schema says time in the GPX file must be UTC.
 * trackserver expects times to be local time, so Oruxmaps would have to send local
   times. I do not know if it does though. Maybe you have to force UTM zone 2. What
   would that do to the GPX files exported by Oruxmaps?
 * IMHO it would be better if trackserver saved all times in UTC and converted them
   when displaying things. Right now uploading and downloading with different local
   time zones could lead to wrong times, at least that is what I believe (did not
   test).
 *  Plugin Author [tinuzz](https://wordpress.org/support/users/tinuzz/)
 * (@tinuzz)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/time-zone-issue-10/#post-10801675)
 * Hi,
 * First of all: UTM zones have nothing to do with timestamps, so that settings 
   shouldn’t have any influence.
 * It has been a long time since I messed with the time conversion code in Trackserver,
   but IIRC it’s like this:
 * – Trackserver tries to store everything in local time. In retrospect, it might
   have been better to store UTC timestamps, but it’s too late for that now.
    – 
   GPX files are supposed to have UTC time, and OruxMaps / MapMyTracks live updates
   also have UTC time, as far as I know. – Trackserver tries to convert all timestamps
   to local time. It uses WordPress’ timezone settings for that. If your tracks 
   are made in a different timezone, that will surely lead to incorrect times displayed
   in Trackserver.
 * That said, I can’t really explain why Trackserver would display your track with
   timestamps two hours _earlier_ than UTC, instead of UTC+2.
 * Timestamps are converted to Unix timestamps (seconds since 1-1-1970) and a timezone
   offset is added to them before storing them in the database. The offset is calculated
   as can be seen here:
 * [https://github.com/tinuzz/wp-plugin-trackserver/blob/master/trackserver.php#L3276](https://github.com/tinuzz/wp-plugin-trackserver/blob/master/trackserver.php#L3276)
 * Somehow, in your case the result is (presumeably) -7200, where it should be 7200.
   Surely, there must be a bug in there somewhere, but for me, it has always worked
   as expected.
 * Can you verify the following things:
    – the value of the ‘timezone_string’ option
   in WordPress – the value of the php.ini setting ‘date.timezone’
 * Regards,
    Martijn.
 *  [wolfgang61](https://wordpress.org/support/users/wolfgang61/)
 * (@wolfgang61)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/time-zone-issue-10/#post-10822841)
 * One more problem with storing times as local time without timezone: When summer
   time ends, the points between 2am and 3am are a mess.
 * Why is it too late to change that? Can’t an update convert times?
 * Regards, Wolfgang

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Time Zone issue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/trackserver.svg)
 * [Trackserver](https://wordpress.org/plugins/trackserver/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/trackserver/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/trackserver/)
 * [Active Topics](https://wordpress.org/support/plugin/trackserver/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/trackserver/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/trackserver/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [wolfgang61](https://wordpress.org/support/users/wolfgang61/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/time-zone-issue-10/#post-10822841)
 * Status: not resolved