Closed
Description
Running this model:
model GetTime
Integer ms;
Integer sec;
Integer min;
Integer hour;
Integer mon;
Integer year;
algorithm
(ms, sec, min, hour, mon, year) := .Modelica.Utilities.System.getTime();
.Modelica.Utilities.Streams.print("ms:" + String(ms) + "\n");
.Modelica.Utilities.Streams.print("sec:" + String(sec) + "\n");
.Modelica.Utilities.Streams.print("min:" + String(min) + "\n");
.Modelica.Utilities.Streams.print("hour:" + String(hour) + "\n");
.Modelica.Utilities.Streams.print("mon:" + String(mon) + "\n");
.Modelica.Utilities.Streams.print("year:" + String(year) + "\n");
end GetTime;
with OpenModelica on Windows will give you year=10
and on Linux will give you year=9
.
With Dymola 2019 on Windows ill give you year=10
.
The code for the external C is here:
https://github.com/modelica/ModelicaStandardLibrary/blob/master/Modelica/Resources/C-Sources/ModelicaInternal.c#L1264
I haven't looked in detail into it, maybe somebody can spot the problem.