Revision b6aeda4a src/Ganeti/Utils.hs
b/src/Ganeti/Utils.hs | ||
---|---|---|
45 | 45 |
, exitUnless |
46 | 46 |
, rStripSpace |
47 | 47 |
, newUUID |
48 |
, clockTimeToString |
|
48 | 49 |
) where |
49 | 50 |
|
50 | 51 |
import Data.Char (toUpper, isAlphaNum, isDigit, isSpace) |
... | ... | |
57 | 58 |
import qualified Ganeti.Constants as C |
58 | 59 |
import System.IO |
59 | 60 |
import System.Exit |
61 |
import System.Time |
|
60 | 62 |
|
61 | 63 |
-- * Debug functions |
62 | 64 |
|
... | ... | |
286 | 288 |
newUUID = do |
287 | 289 |
contents <- readFile C.randomUuidFile |
288 | 290 |
return $! rStripSpace $ take 128 contents |
291 |
|
|
292 |
-- | Convert a ClockTime into a (seconds-only) timestamp. |
|
293 |
clockTimeToString :: ClockTime -> String |
|
294 |
clockTimeToString (TOD t _) = show t |
Also available in: Unified diff