module Now where

import Time
import System.Locale

now = do
    clockT <- getClockTime
    calT   <- toCalendarTime clockT
    return (isodate calT)

now_plus_min min = do
    nowClockT      <- getClockTime
    let thenClockT  = addToClockTime (TimeDiff 0 0 0 0 min 0 0) nowClockT
    calT <- toCalendarTime thenClockT
    return (isodate calT)

isodate = formatCalendarTime defaultTimeLocale "%Y%m%d%H%M%S"
