Jump to content

Recommended Posts

Posted

First, sorry if this topic has been raised / been highlighted and solved before but did not find any info about it:
If I´m not mistaken, earlier version read the user edited database that we create and upload, as LOCAL times for departures and arrivals.

The latest version here , reads it as UTC. Is that correctly understood? Or is something else causing our flights come up with UTC after our local departure times?


If yes, is it possible to tweak or select local times instead of UTC?

After update at our VA, all departures and arrivals, local times,  are now  shown as UTC after the time stamp.

Thus, the whole database will be wrong for our pilots.
As this VA covers several parts of the world and also several timezones, that is a huge issue.

Any suggestions how to fix this?

Rgds

Harald Lysoee
Malaysia VA
 

  • Administrators
Posted

In the database, dpt_time and arr_time fields are varchar fields. 

The created_at, updated_at, deleted_at fields are timestamps.

 

I help manage a VA who has all their dpt_time and arr_time set in the DB as local to the dpt/arr airport. 

Those local times do not get changed to UTC anywhere or by anything.

That VA has been updated numerous times and is currently on the latest release version. Never once have those two fields changeed.

 

Timestamp will usually be in UTC or local time of the actual server location, depending on settings.

Varchar stores a short to medium string of characters.

 

Personally, I think having dpt/arr in local time (especially across multiple timezones only makes it more confusing for users. Doing everything in one time 'zone' (UTC) is much simpler.

In the real world, if you were to ask ATC for a time check you would receive the time in UTC.

Posted

As everything else in aviation, all departure - arrival times should be in UTC too. @ProAvia is right, the flights table only stores those values as text, not datetime values (timestamps etc.), thus you can use them as you wish.

 

Considering that people use them as UTC times and prepare their schedules in UTC format, some addon themes provide UTC to Local conversions for those values. What those addons do is basically convert those "texts" to "time values" (by default they are in UTC as expected) then convert the utc to local time of the airport.

 

You can check the example below for that conversion.

 

https://github.com/FatihKoz/DisposableTheme/blob/main/resources/views/layouts/Disposable_v3/flights/table.blade.php#L42-L43

 

Good luck

Posted

Also, if you like to store those times as local values, conversion to UTC would still be possible. 

 

Like displaying the local times directly from the flight (as you entered them), then converting the value to UTC as additional display (opposite of the example above)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...