I'm working on a project where I have to gather data from GPS devices located in different countries (timezones + daylight savings) and display those data to different users also from different countries. I'm thinking about saving the date in UTC format (that is what I receive from the GPS device) but then again I belive I'll have trouble converting that date to the user's local date (I have to display historical data also so I'll have to account for daylight savings for the given date). Maybe the datetimeoffset datatype would be more appropriate but how would I go about converting the received UTC date to the datetimeoffset datatype? What would you suggest? Thanks!
Which SQL datatype should I use to store datetime from GPS devices?
399 Views Asked by sdagkas At
1
There are 1 best solutions below
Related Questions in SQL
- SQL schema for a fill-in-the-blank exercise
- Hibernate: JOIN inheritance question - why the need for two left joins
- What's supposed to be the problem in this query?
- Compare fields in two tables
- How to change woocomerce or full wordpress currency with value from USD to AUD
- Dynamic query creation with Array like implementation
- SQL query to get student enrolled in this month in a course - Moodle
- SQL LAG() function returning 0 for every row despite available previous rows
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- Use row values from another table to select them as columns and establish relations between them (pivot table)
- SQL: Generate combination table based on source and destination column from same table
- how to use system's environnement variables in sql script
- PHP fetchAll on JOIN
- Multitable joining in Sql
- How to display name starting from 'z' by using BETWEEN cmd only?
Related Questions in GPS
- Query Overpass turbo by lat/lon to find specific tags
- SQL: Assigning occasion numbers to GPS points when visiting places based on conditions
- Updating Ublox module via commandline with file
- Why does getting the speed in my android app fluctuate too high even when not moving while in the app "GPS Test" it shows 0?
- Unity - AR - GPS (Simple 3D Objects Appear at GPS coordinates) - Android and iOS
- Android location is providing timestamps in the future, or am I stupid? Try it for yourself
- Convert data of the format [longitude, latitude, altitude] into the format [x, y, z]
- How to program GNSS with SIMCOM A7670 and Arduino
- convert hatanaka to rinex for multiple files
- Calculating a DateTime in a Specific Encoding in C#
- GPS neo and Arduino mega 2560 with other sensors
- Receiving Data from Teltonika FMB140 Device via SIM on Server using CodeIgniter 4
- Load IGC file as Simple Features in R
- Android Java - LocationListener taking too long too fetch location even with stable connection
- Is there a function to isolate rows of data based on the distance between the start and stop of their GPS coordinates?
Related Questions in UTC
- react apex charts x axis labels and tool tip showing different times instead of actual PST time
- Ical.net Serialization Error when serializing 12:00 AM Midnight
- MySQL inserts on March 09th fail due to DST
- Python UTC America/New York Time Conversion
- How to create cronjob such that reminders are triggered as per user timezone?
- How to convert any timestamp of a given timezones into UTC?
- Convert UTC time to local time in nodejs while creating csv
- Mysql UTC format works for "SELECT" but NOT for "UPDATE"
- How could I get hours of each timezone for 2000rows in dataframes
- ngx-daterangepicker displaying wrong value with UTC timezone
- javascript converting datestring to epoch returns three digits too much
- How to convert date without timezone
- Removing "01" Prefix from Timestamps in Plot in Python
- How to convert dates to UTC taking into account winter and summer time?
- Python Arrow datetime function returns a timestamp with seconds field value more than 60
Related Questions in DATETIMEOFFSET
- How to find to find 'today at midnight' in .NET?
- Is there a bug in the .NET TimeSpan Class When Calculating TotalMilliseconds?
- Handling dates and times between C# API and Typescript
- Difference between two DateTimeOffset returns an unexpected negative value
- Check if DatetimeOffset is between 10 PM (today) and 2 AM (next day)
- Check if current time is between two different times in SQL
- How to get specific time of tomorrow's date in datetimeoffset in c#?
- How to add a utc offset to a substring c#
- Resample hourly timeseries to MS granularity with offset
- Time Zone Related Issue
- C# DateTimeOffset bad hour. Difference TimeSpan to DateTime and DateTime to TimeSpan
- Is DateTimeOffset.MaxValue.ToUnixTimeMilliseconds() stable?
- Convert DateTimeOffset to Python date
- I am getting error while update-database command to make tables related to Identity. column parameter or variable:cannot find data type datetimeoffset
- Insert objects into database
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
As you don't have to store any time zone along with the datetime, you can store them as UTC. That has the advantage of being linear, and easy to document. You don't have to bother with gaps and overlaps at the daylight savings time switches.
Convert the date to the local time zone when you display it to the user. It doesn't make sense to convert it to a local time zone until you know which user will be viewing the data.