ResInsight
ResInsight copied to clipboard
Issues related to date string parsing
The following issue has been seen on Windows. Please describe the error situation more detailed to be able to reproduce the issue. If you have a small test case, please attach to this issue.

I downloaded and unzipped ResInsight Version, ResInsight-2022.06.0_oct-4.0.0_win64, from the github. Upon unzipping and running the software, I get the following errors. I am using Windows 10. I am not even able to run the program to try and make a plot.
This might be related to some locale settings for time and date. If you are able, try to open Preferences, and check if you are able to set sensible values for time and date string in the following dialog.
https://resinsight.org/misc/preferences/#plotting
Thanks. Your suggestion worked but the simulation start date is set to 1 Jan 2000 even though the date in my opm input data file is from 1 Oct 1968. Is there a place to setup up the simulation start date? I don't have this problem with the ResInsight linux version. See attached plots from Eclipse Office vs. 2022.06 ResInsight (windows and Linux versions)

This issue might be of help, see how to set summary file import in Preferences to libecl https://github.com/OPM/ResInsight/issues/8233
This issue is probably related to use of time_t, and this structure is starting in 1970. Is it possible for you to attach an example summary file having these issues?
https://cplusplus.com/reference/ctime/time_t/
Here are the data files exported from ResInsight Version 2022.06 windows vs. linux.
ResInsight_Linux_Pressure_average_value.TXT
ResInsight_Windows_Pressure_average_value.TXT

Hi, I have encoutered the same problem. When I try to run ResInsight 2022.06.0 or 2022.06.1, the same error message window popped up and I could not even run the program. So I cannot open Preference as @magnesj suggested. Is there any workaround? My OS is windows 10 and locale is Japanese or cp932.
Hi @shohirose! Can you check the contents of the "timeFormat" field in the Windows registry? You can find it by opening "regedit.exe" and go into "Compute\HKEY_CURRENT_USER\SOFTWARE\Ceetron\ResInsight". My value is "hh AP;hh:mm AP;hh:mm:ss AP;hh:mm:ss.zzz AP". This value is read when opening ResInsight, and it could be that new versions of ResInsight stricter.
Thanks @kriben The problem only occurs on my company-supplied laptop. ResInsight 2022.06.1 runs without any problem on my personal laptop, whose OS is Windows 11 and locale is Japanese. Let me give a few days to get the administrative privileges from IT dept and check the registry.
@kriben
The value of "timeFormat" is set to "0".

I fixed the problem! What I did was that run ResInsight 2021.10 and open Preferences > Plotting tab and change Time Format from "0" to "HH:mm:ss" and close the program.

Then I could run ResInsight 2022.06.1 without the error. The value of timeFormat in the registry is now set to "HH;HH:mm;HH:mm:ss;HH:mm:ss.zzz".

The error might be due to the initialization of timeFormat variable.
@shohirose Thanks for the detailed feedback and documentation of your workaround. This is useful for others experiencing the same issue.
I am still having the same problem. That is ResInsight is not recognizing my start date of 10/01/1968 and it uses 10/01/2000. I checked both Preferences>Plotting and the registry as per @shohirose. It did not fix the starting date problem.
Two issues are discussed in this thread.
- Parsing of date in Preferences. This issue has a workaround that seems to work well.
- Handling of dates before 1970. Time steps are stored as time_t values, and will not be able to handle dates before 1970. This is a limitation in an underlying reader library, and is not planned to be fixed in the short/medium term. https://cplusplus.com/reference/ctime/time_t/
Sorry for the inconvenience.