System date in a recipe


#1

how can I define date in a recipe to be displayed in a template?

[root@machine ~]# date

Wed Dec 14 13:51:45 MST 2011


#2

Time.now.to_date.rfc2822 ? Or similar.

http://ruby-doc.org/stdlib-1.9.3/libdoc/date/rdoc/DateTime.html

–AJ

On 15 December 2011 09:53, djo@dave-n-georgi.com wrote:

how can I define date in a recipe to be displayed in a template?

[root@machine ~]# date

Wed Dec 14 13:51:45 MST 2011


#3

Be aware that putting a date in a template will always regenerate the template and trigger any actions the resource may have.

On Dec 14, 2011, at 12:58 PM, AJ Christensen aj@junglist.gen.nz wrote:

Time.now.to_date.rfc2822 ? Or similar.

http://ruby-doc.org/stdlib-1.9.3/libdoc/date/rdoc/DateTime.html

–AJ

On 15 December 2011 09:53, djo@dave-n-georgi.com wrote:

how can I define date in a recipe to be displayed in a template?

[root@machine ~]# date

Wed Dec 14 13:51:45 MST 2011