Copyright | (c) 2014 Vincent Hanquez <vincent@snarc.org> |
---|---|
License | BSD-style |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Time.System
Description
Get the system timezone and current time value in multiple formats.
Synopsis
Current time, in computer-friendly format
timeCurrent :: IO Elapsed Source #
Get the current number of seconds elapsed since the start of the Unix epoch.
timeCurrentP :: IO ElapsedP Source #
Get the current number of seconds and nanoseconds since the start of the Unix epoch (1970-01-01 00:00:00 UTC).
Current time, in human-friendly format
dateCurrent :: IO DateTime Source #
Get the current global date.
This is equivalent to:
timeGetDateTimeOfDay `fmap` timeCurrentP
localDateCurrent :: IO (LocalTime DateTime) Source #
Get the localized date by using timezoneCurrent
and dateCurrent
.
localDateCurrentAt :: TimezoneOffset -> IO (LocalTime DateTime) Source #
Get the localized date at a specific timezone offset.
System timezone
timezoneCurrent :: IO TimezoneOffset Source #
Get the current timezone offset.
This includes daylight saving time when it is in operation.