| 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.Instant
Contents
Description
An Instant is universal fixed moment in time.
Types
Represents a point on a global time line. An Instant has no concept of time zone or calendar. It is nothing more than the number of nanoseconds since epoch (1.March.2000)
Instances
| Show Instant Source # | A debug rendering exposing the internal epoch-relative fields (epoch is 1.March.2000). There is no clean
total constructor to reproduce an arbitrary |
| NFData Instant Source # | |
Defined in Data.HodaTime.Instant.Internal | |
| Eq Instant Source # | |
| Ord Instant Source # | |
Defined in Data.HodaTime.Instant.Internal | |
| Hashable Instant Source # | |
Defined in Data.HodaTime.Instant.Internal | |
Constructors
The current time as an Instant.
Note: Hoda Time does not model leap seconds, so now follows POSIX time semantics — the returned Instant
does not include leap seconds (every day is treated as exactly 86400 seconds). This keeps now consistent with
the rest of the library: round-tripping through a ZonedDateTime never adds or removes leap seconds.
Math
Conversion
inTimeZone :: IsCalendarDateTime cal => Instant -> TimeZone -> ZonedDateTime cal Source #
Convert Instant to a ZonedDateTime in the specified time zone. The calendar must be derivable or specified in the type explicitly