[RESOLVED] Changes to Date & Time in Prepar3D V3.2

flying-w
Posts: 56
Joined: Sun Jan 01, 2012 3:27 pm

[RESOLVED] Changes to Date & Time in Prepar3D V3.2

Postby flying-w » Wed Mar 23, 2016 8:15 am

The handling of date and time seems to have changed in Prepar3D V3.2 specifically compared with all previous versions and FSX before it. The day numbering system now seems to be 1=Sunday, in previous versions it was 0=Sunday, and zulu day number is inconsistent with the local day number when the combination of current time and timezone puts the zulu time point on a different day to the local time point. Here's an example, first my subscriptions

_simconnect.AddToDataDefinition(StbSimConnect.DATA_DEFINITIONS.NOW_TIME, "LOCAL TIME", "seconds", SIMCONNECT_DATATYPE.INT32, 999999999.0f, SimConnect.SIMCONNECT_UNUSED);
_simconnect.AddToDataDefinition(StbSimConnect.DATA_DEFINITIONS.NOW_TIME, "ZULU TIME", "seconds", SIMCONNECT_DATATYPE.INT32, 999999999.0f, SimConnect.SIMCONNECT_UNUSED);
_simconnect.AddToDataDefinition(StbSimConnect.DATA_DEFINITIONS.NOW_TIME, "ABSOLUTE TIME", "seconds", SIMCONNECT_DATATYPE.INT32, 14.0f, SimConnect.SIMCONNECT_UNUSED);
_simconnect.AddToDataDefinition(StbSimConnect.DATA_DEFINITIONS.NOW_TIME, "LOCAL DAY OF WEEK", "number", SIMCONNECT_DATATYPE.INT32, 0f, SimConnect.SIMCONNECT_UNUSED);
_simconnect.AddToDataDefinition(StbSimConnect.DATA_DEFINITIONS.NOW_TIME, "LOCAL DAY OF MONTH", "number", SIMCONNECT_DATATYPE.INT32, 999999999.0f, SimConnect.SIMCONNECT_UNUSED);
_simconnect.AddToDataDefinition(StbSimConnect.DATA_DEFINITIONS.NOW_TIME, "LOCAL MONTH OF YEAR", "number", SIMCONNECT_DATATYPE.INT32, 999999999.0f, SimConnect.SIMCONNECT_UNUSED);
_simconnect.AddToDataDefinition(StbSimConnect.DATA_DEFINITIONS.NOW_TIME, "LOCAL YEAR", "number", SIMCONNECT_DATATYPE.INT32, 999999999.0f, SimConnect.SIMCONNECT_UNUSED);
_simconnect.AddToDataDefinition(StbSimConnect.DATA_DEFINITIONS.NOW_TIME, "ZULU DAY OF WEEK", "number", SIMCONNECT_DATATYPE.INT32, 999999999.0f, SimConnect.SIMCONNECT_UNUSED);
_simconnect.AddToDataDefinition(StbSimConnect.DATA_DEFINITIONS.NOW_TIME, "TIME ZONE OFFSET", "minutes", SIMCONNECT_DATATYPE.INT32, 0f, SimConnect.SIMCONNECT_UNUSED);
_simconnect.RegisterDataDefineStruct<FsTime.SIM_TIME>(StbSimConnect.DATA_DEFINITIONS.NOW_TIME);

Now set the simulator to airport EGCC, Sunday 21/6/2015 00:05:31 BST (Local time), Saturday 20/6/2015 23:05:31 GMT (Zulu). Here's the results I get from Prepar3D V3.1 for the above subscription:

absoluteTime: 3440896187:
localDaySeconds: 331
localMonth: 6
localMonthDay: 21
localSimDay: 0
localYear: 2015
timeZoneOffset: -60
zuluDaySeconds: 83131
zuluSimDay: 6

And the same scenario for Prepar3D V3.2:
absoluteTime: 3440896187
localDaySeconds: 331
localMonth: 6
localMonthDay: 21
localSimDay: 1
localYear: 2015
timeZoneOffset: -60
zuluDaySeconds: 83131
zuluSimDay: 1

You can clearly see the change in day numbering convention, and the error in "zuluSimDay" compared with "localSimDay" (they cannot be the same value, the local time and zulu time occur on different days).

This all causes problems to my add-on, "Super Traffic Board", and many people have reported the issue so it is not isolated. Is the day number change intentional in V3.2 and that's the way it will always be going forward? Can you fix the problems with zulu day and local day across timezones please?

Many thanks
Simon

Mike LM
Posts: 1344
Joined: Mon Jul 20, 2015 5:26 pm

Re: Changes to Date & Time in Prepar3D V3.2

Postby Mike LM » Wed Mar 23, 2016 7:00 pm

First, day of week was changed to be 0-based. This was done to be consistent with other similar things like month.

Second, thank you for pointing out the error with zulu time. I have opened a ticket for us to begin working on a solution.

- Mike
Prepar3D® Software Engineer

flying-w
Posts: 56
Joined: Sun Jan 01, 2012 3:27 pm

Re: Changes to Date & Time in Prepar3D V3.2

Postby flying-w » Mon Jun 13, 2016 5:52 am

The zulu day error is resolved in Prepar3D V3.3, many thanks for taking care of it.

Simon


Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 7 guests