hourglass-0.2.12: simple performant time related library

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | unknown
Safe Haskell | Safe-Inferred
Language | Haskell2010

Time.System

Contents

- Current time in computer friendly format
- Current time in human friendly DateTime format
- System timezone

Description

Get the system timezone and current time value in multiple formats

Synopsis

- timeCurrent :: IO Elapsed
- timeCurrentP :: IO ElapsedP
- dateCurrent :: IO DateTime
- localDateCurrent :: IO (LocalTime DateTime)
- localDateCurrentAt :: TimezoneOffset -> IO (LocalTime DateTime)
- timezoneCurrent :: IO TimezoneOffset

# Current time in computer friendly format

timeCurrent :: IO Elapsed Source #

Get the current elapsed seconds since epoch

timeCurrentP :: IO ElapsedP Source #

Get the current elapsed seconds (precise to the nanosecond) since epoch

# Current time in human friendly DateTime 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 include daylight saving time when in operation.