| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
PostgresqlTypes.Timetz
Contents
Synopsis
- data Timetz
- toTimeInMicroseconds :: Timetz -> Int64
- toTimeZoneInSeconds :: Timetz -> Int32
- toTimeOfDay :: Timetz -> TimeOfDay
- normalizeToTimeZone :: Timetz -> TimeZone
- refineToTimeZone :: Timetz -> Maybe TimeZone
- normalizeFromTimeInMicrosecondsAndOffsetInSeconds :: Int64 -> Int32 -> Timetz
- normalizeFromTimeOfDayAndTimeZone :: TimeOfDay -> TimeZone -> Timetz
- refineFromTimeInMicrosecondsAndOffsetInSeconds :: Int64 -> Int32 -> Maybe Timetz
- refineFromTimeOfDayAndTimeZone :: TimeOfDay -> TimeZone -> Maybe Timetz
Documentation
PostgreSQL timetz type. Time of day with time zone.
Stored as microseconds since midnight and time zone offset in seconds.
Low value: 00:00:00+1559. High value: 24:00:00-1559.
Instances
| Arbitrary Timetz Source # | |
| Eq Timetz Source # | |
| Ord Timetz Source # | |
| IsString Timetz Source # | |
Defined in PostgresqlTypes.Timetz Methods fromString :: String -> Timetz # | |
| Read Timetz Source # | |
| Show Timetz Source # | |
| Hashable Timetz Source # | |
Defined in PostgresqlTypes.Timetz | |
| IsScalar Timetz Source # | |
Defined in PostgresqlTypes.Timetz Methods schemaName :: Tagged Timetz (Maybe Text) # typeName :: Tagged Timetz Text # baseOid :: Tagged Timetz (Maybe Word32) # arrayOid :: Tagged Timetz (Maybe Word32) # typeParams :: Tagged Timetz [Text] # typeSignature :: Tagged Timetz Text # binaryEncoder :: Timetz -> Write # binaryDecoder :: Variable (Either DecodingError Timetz) # textualEncoder :: Timetz -> TextBuilder # | |
Accessors
toTimeInMicroseconds :: Timetz -> Int64 Source #
Extract time in microseconds since midnight.
toTimeZoneInSeconds :: Timetz -> Int32 Source #
Extract time zone offset in seconds.
toTimeOfDay :: Timetz -> TimeOfDay Source #
Extract time of day.
normalizeToTimeZone :: Timetz -> TimeZone Source #
Extract time zone rounding the offset in seconds to the nearest minute, because that's the precision supported by TimeZone.
refineToTimeZone :: Timetz -> Maybe TimeZone Source #
Try to extract time zone, failing if the offset in seconds is not a multiple of 60.
Constructors
normalizeFromTimeInMicrosecondsAndOffsetInSeconds :: Int64 -> Int32 -> Timetz Source #
Construct Timetz from time in microseconds since midnight and time zone offset in seconds, clamping the out of range values.