ResInsight icon indicating copy to clipboard operation
ResInsight copied to clipboard

Issues related to date string parsing

Open magnesj opened this issue 3 years ago • 6 comments

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.

image

magnesj avatar Sep 02 '22 05:09 magnesj

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. ResInsight_2022_06_win64

davido300 avatar Sep 02 '22 07:09 davido300

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

magnesj avatar Sep 09 '22 06:09 magnesj

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) ResInsight_vs_ECL_plots

davido300 avatar Sep 09 '22 21:09 davido300

This issue might be of help, see how to set summary file import in Preferences to libecl https://github.com/OPM/ResInsight/issues/8233

magnesj avatar Sep 12 '22 05:09 magnesj

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/

magnesj avatar Sep 12 '22 10:09 magnesj

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 ResInsight_2022_06_Win_vs_Linux_09152022

davido300 avatar Sep 16 '22 00:09 davido300

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.

shohirose avatar Sep 27 '22 08:09 shohirose

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.

kriben avatar Sep 27 '22 09:09 kriben

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.

shohirose avatar Sep 28 '22 00:09 shohirose

@kriben The value of "timeFormat" is set to "0". image

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. image

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". image

The error might be due to the initialization of timeFormat variable.

shohirose avatar Sep 30 '22 07:09 shohirose

@shohirose Thanks for the detailed feedback and documentation of your workaround. This is useful for others experiencing the same issue.

magnesj avatar Oct 03 '22 06:10 magnesj

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.

davido300 avatar Oct 06 '22 23:10 davido300

Two issues are discussed in this thread.

  1. Parsing of date in Preferences. This issue has a workaround that seems to work well.
  2. 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.

magnesj avatar Oct 07 '22 05:10 magnesj