| Copyright | (C) 2016 Jason Johnson |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Jason Johnson <jason.johnson.081@gmail.com> |
| Stability | experimental |
| Portability | POSIX, Windows |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.HodaTime.OffsetDateTime
Contents
Description
An OffsetDateTime is a date and time combined with an offset from UTC time. OffsetDateTime is the form that HTTP uses to deal with dates and times.
Synopsis
- data OffsetDateTime cal
- fromInstantWithOffset :: IsCalendarDateTime cal => Instant -> Offset -> OffsetDateTime cal
- fromCalendarDateTimeWithOffset :: CalendarDateTime cal -> Offset -> OffsetDateTime cal
- toCalendarDateTime :: OffsetDateTime cal -> CalendarDateTime cal
- offset :: OffsetDateTime cal -> Offset
Types
data OffsetDateTime cal Source #
A CalendarDateTime with a UTC offset. This is the format used by e.g. HTTP. This type has a fixed TimeZone with the name "UTC(+/-)offset". If the offset is
empty, the name of the TimeZone will be UTC
Instances
Constructors
fromInstantWithOffset :: IsCalendarDateTime cal => Instant -> Offset -> OffsetDateTime cal Source #
Create an OffsetDateTime from an Instant and an Offset.
fromCalendarDateTimeWithOffset :: CalendarDateTime cal -> Offset -> OffsetDateTime cal Source #
Create an OffsetDateTime from a CalendarDateTime and an Offset.
Math
Conversion
toCalendarDateTime :: OffsetDateTime cal -> CalendarDateTime cal Source #
The local (wall-clock) CalendarDateTime of the OffsetDateTime, before the offset is applied.
offset :: OffsetDateTime cal -> Offset Source #
The UTC Offset of the OffsetDateTime.