generated from arras-energy/gridlabd-old
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NOW pseudo-global to support date/time format (#122)
Signed-off-by: David P. Chassin <dchassin@slac.stanford.edu> Signed-off-by: David P. Chassin <david.chassin@me.com>
- Loading branch information
Showing
2 changed files
with
57 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[[/GLM/Global/Now.md]] -- Get current time | ||
|
||
# Synopsis | ||
|
||
GLM: | ||
|
||
~~~ | ||
${NOW} | ||
${NOW FORMAT} | ||
~~~ | ||
|
||
# Description | ||
|
||
If used without the `FORMAT`, then the format used is `%Y%m%d-%H%M%S`. | ||
|
||
# Example | ||
|
||
File `/tmp/test.glm`: | ||
|
||
~~~ | ||
#print ${NOW} | ||
#print ${NOW %m/%d/%y %H:%M} | ||
~~~ | ||
|
||
Run the following: | ||
|
||
~~~ | ||
gridlabd /tmp/test.glm | ||
~~~ | ||
|
||
Output: | ||
|
||
~~~ | ||
20231008-101445 | ||
10/08/23 10:14 | ||
~~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters