Managing Time Zones and Local Time: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
When importing data with [[Importing_Data_to_Datatable_from_CSV_File|CSV file import]], timestamps in CSV files may or may not have time zone information. If timestamps don't have the time zone, times are interpreted as such and they appear in the model exactly as imported. If the timestamps have the time zone information, timestamps are imported as UTC, to make timestamps with different time zones comparable with each other. It's also possible to import timestamps without the time zone in the date format ("zzz") which will ignore the time zone and import timestamps like they didn't contain the time zone information.
When importing data with [[Importing_Data_to_Datatable_from_CSV_File|CSV file import]], timestamps in CSV files may or may not have time zone information. If timestamps don't have the time zone, times are interpreted as such and they appear in the model exactly as imported. If the timestamps have the time zone information, timestamps are imported as UTC, to make timestamps with different time zones comparable with each other. It's also possible to import timestamps without the time zone in the date format ("zzz") which will ignore the time zone and import timestamps like they didn't contain the time zone information.


As a recommended practice, if all time information is in a specific local time, timestamps can be imported in that time zone to QPR ProcessAnalyzer models. If there are data where there events recorded in different time zones, it may be better to import timestamps as UTC to avoid any misinterpretaion (this is done by including the time zone to the imported timestamps).
As a recommended practice, if all time information is in a specific local time, timestamps can be imported in that time zone to QPR ProcessAnalyzer models. If there are data where there events recorded in different time zones, it may be better to import timestamps as UTC to avoid any misinterpretation (this is done by including the time zone to the imported timestamps).
 
For example, the CSV file contains the following data:
<pre>
2021-05-16 08:34:12
</pre>
 
When the value is imported to a datatable, and a model is created for the data, this timestamp is shown exactly as it was imported, i.g 16th of May 2021 at 8:34:12.
 
As another example, the CSV file contains the following data:
<pre>
2021-05-16 08:34:12+02:00
</pre>
 
When the value is imported to a datatable using date format yyyy-MM-dd HH:mm:sszzz, this timestamp is shown as UTC in the model. i.e. 16th of May 2021 at 6:34:12. If the CSV file is imported without the time zone (i.e. zzz), the time zone is ignored and this timestamp is shown as in the model as 16th of May 2021 at 8:34:12.

Revision as of 00:06, 17 November 2021

When importing data to QPR ProcessAnalyzer, date and time data in different local times may be encountered. It's important that the times are interpreted correctly, so that they are comparable and for example durations between timestamps are calculated correctly.

QPR ProcessAnalyzer doesn't store the time zone differences separately, but instead uses times that have been imported to it. The models can thus contain timestamps from any time zones and it's just a matter of agreement, which time zones the timestamps are from.

When importing data with CSV file import, timestamps in CSV files may or may not have time zone information. If timestamps don't have the time zone, times are interpreted as such and they appear in the model exactly as imported. If the timestamps have the time zone information, timestamps are imported as UTC, to make timestamps with different time zones comparable with each other. It's also possible to import timestamps without the time zone in the date format ("zzz") which will ignore the time zone and import timestamps like they didn't contain the time zone information.

As a recommended practice, if all time information is in a specific local time, timestamps can be imported in that time zone to QPR ProcessAnalyzer models. If there are data where there events recorded in different time zones, it may be better to import timestamps as UTC to avoid any misinterpretation (this is done by including the time zone to the imported timestamps).

For example, the CSV file contains the following data:

2021-05-16 08:34:12

When the value is imported to a datatable, and a model is created for the data, this timestamp is shown exactly as it was imported, i.g 16th of May 2021 at 8:34:12.

As another example, the CSV file contains the following data:

2021-05-16 08:34:12+02:00

When the value is imported to a datatable using date format yyyy-MM-dd HH:mm:sszzz, this timestamp is shown as UTC in the model. i.e. 16th of May 2021 at 6:34:12. If the CSV file is imported without the time zone (i.e. zzz), the time zone is ignored and this timestamp is shown as in the model as 16th of May 2021 at 8:34:12.