Differences
This shows you the differences between the selected revisions of the page.
2016-09-29 | 2016-09-29 | ||
syntax (martin) | dissolving more options section into the other sections (martin) | ||
Line 21: | Line 21: | ||
It outputs a current date in format ''2016-09-29'' on any locale. | It outputs a current date in format ''2016-09-29'' on any locale. | ||
+ | |||
+ | Modify the ''TIMESTAMP_FORMAT'' as you need. For all options of the timestamp format, see the ''[[scripting#timestamp|%TIMESTAMP%]]'' syntax documentation. | ||
Of course, if you actually just need to print the timestamp (or output it a file), you do not need to do it indirectly via the environment variable, just use a simple: | Of course, if you actually just need to print the timestamp (or output it a file), you do not need to do it indirectly via the environment variable, just use a simple: | ||
Line 44: | Line 46: | ||
To calculate a time one hour ago, set the ''TIMESTAMP_RELATIVE'' to ''-1H'' and change the ''TIMESTAMP_FORMAT'' to include also a time a time, e.g. ''yyyy-mm-dd_hh:nn:ss''. | To calculate a time one hour ago, set the ''TIMESTAMP_RELATIVE'' to ''-1H'' and change the ''TIMESTAMP_FORMAT'' to include also a time a time, e.g. ''yyyy-mm-dd_hh:nn:ss''. | ||
- | ===== More Options ===== | + | For all options of the relative date/time calculation, see the ''[[scripting#timestamp|%TIMESTAMP%]]'' syntax documentation. |
- | + | ||
- | For all options of the timestamp format and the relative date/time calculation, see the ''[[scripting#timestamp|%TIMESTAMP%]]'' syntax documentation. | + |