Forum: Cfengine Help
Subject: Cfengine time handling
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,21606,21606#msg-21606

Something I've not been completely clear upon (well, among several things) is 
how Cfengine handles time.  Are the "integers" referenced just Unix time 
values, as in, seconds since the Jan 1, 1970 epoch?  If so, does that mean that 
the "accumulated" function just returns the years/hours/etc converted to a unix 
time aded to 0, while "ago" just takes that many seconds and subtracts from the 
current time?  And, therefore, aren't "accumulated" and "on" the same function, 
just renamed for convenience? :)

The main reason I ask is that I occasionally have Unix timestamps to compare 
against things, and I'd like to know the significance of the integer.  In 
particular, yesterday I wanted to find all N processes which were over a month 
old.  I presume that doing "irange(0, ago(0,1,0,0,0,0))" would do it, but 
honestly haven't tested it yet.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to