diff options
| author | Carlos Sosa <gnusosa@gnusosa.net> | 2020-05-01 13:22:05 -0700 |
|---|---|---|
| committer | Carlos Sosa <gnusosa@gnusosa.net> | 2020-05-15 12:37:16 -0700 |
| commit | 723f766abb6ce73d1c0e9e0e1ccc34656737db32 (patch) | |
| tree | 87a7608e38651d9f35014b14b79dad33c9822d2f /src/System/Utility/H9Clock/Time.hs | |
Initial commit
Diffstat (limited to 'src/System/Utility/H9Clock/Time.hs')
| -rw-r--r-- | src/System/Utility/H9Clock/Time.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/System/Utility/H9Clock/Time.hs b/src/System/Utility/H9Clock/Time.hs new file mode 100644 index 0000000..e78d540 --- /dev/null +++ b/src/System/Utility/H9Clock/Time.hs @@ -0,0 +1,16 @@ +module System.Utility.H9Clock.Time + ( getLocalTimeSec + , getHourMin + ) +where + +import Data.Time + +getLocalTimeSec :: IO TimeOfDay +getLocalTimeSec = + localTimeOfDay + <$> (utcToLocalTime <$> getCurrentTimeZone <*> getCurrentTime) + +getHourMin :: IO (Int, Int) +getHourMin = do localTime <- getLocalTimeSec + return (todHour localTime, todMin localTime) |
