Skip to content

Commit

Permalink
Add DateTime.now()
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kessler authored and beutlich committed Apr 11, 2020
1 parent 2f1e8ac commit 6b3eab1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Modelica/Utilities/Time.mo
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,13 @@ days = leapDays(2000, 2020) // = 5 leap days in range [2000, 2019]

end epoch;

encapsulated function now "Get current system date and time as DateTime"
import Modelica.Utilities.Time.DateTime;
output DateTime now;
algorithm
now:=DateTime.'constructor'.fromSystemTime();
end now;

end DateTime;

operator record Duration
Expand Down

0 comments on commit 6b3eab1

Please sign in to comment.