From 8bce89a6165ac0ae5c56ce92f788af0bc4569937 Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Tue, 11 Jun 2013 09:13:32 +0200 Subject: [PATCH] setup epoch time doesn't have tics on Python 2.6.4 (Solaris). --- system/setup | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/setup b/system/setup index 274fb469ee9..d627ba6e720 100644 --- a/system/setup +++ b/system/setup @@ -365,6 +365,8 @@ class Facts(object): self.facts['date_time']['minute'] = now.strftime('%M') self.facts['date_time']['second'] = now.strftime('%S') self.facts['date_time']['epoch'] = now.strftime('%s') + if self.facts['date_time']['epoch'][0] == '%': + self.facts['date_time']['epoch'] = str(int(time.time())) self.facts['date_time']['date'] = now.strftime('%Y-%m-%d') self.facts['date_time']['time'] = now.strftime('%H:%M:%S') self.facts['date_time']['iso8601_micro'] = now.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%fZ")