<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Time.LocalTime</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Data-Time-LocalTime.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">time-1.4: A time library</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Data.Time.LocalTime</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Time zones </a></li><li><a href="#g:2">Time of day </a></li><li><a href="#g:3">Local Time </a></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:TimeZone">TimeZone</a> = <a href="#v:TimeZone">TimeZone</a> {<ul class="subs"><li><a href="#v:timeZoneMinutes">timeZoneMinutes</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:timeZoneSummerOnly">timeZoneSummerOnly</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:timeZoneName">timeZoneName</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li></ul>}</li><li class="src short"><a href="#v:timeZoneOffsetString">timeZoneOffsetString</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:timeZoneOffsetString-39-">timeZoneOffsetString'</a> :: <a href="Data-Time-Format.html#t:NumericPadOption">NumericPadOption</a> -> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:minutesToTimeZone">minutesToTimeZone</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></li><li class="src short"><a href="#v:hoursToTimeZone">hoursToTimeZone</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></li><li class="src short"><a href="#v:utc">utc</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></li><li class="src short"><a href="#v:getTimeZone">getTimeZone</a> :: <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></li><li class="src short"><a href="#v:getCurrentTimeZone">getCurrentTimeZone</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:TimeOfDay">TimeOfDay</a> = <a href="#v:TimeOfDay">TimeOfDay</a> {<ul class="subs"><li><a href="#v:todHour">todHour</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:todMin">todMin</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:todSec">todSec</a> :: <a href="../base-4.5.1.0/Data-Fixed.html#t:Pico">Pico</a></li></ul>}</li><li class="src short"><a href="#v:midnight">midnight</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></li><li class="src short"><a href="#v:midday">midday</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></li><li class="src short"><a href="#v:makeTimeOfDayValid">makeTimeOfDayValid</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Fixed.html#t:Pico">Pico</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></li><li class="src short"><a href="#v:utcToLocalTimeOfDay">utcToLocalTimeOfDay</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> -> (<a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a>, <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a>)</li><li class="src short"><a href="#v:localToUTCTimeOfDay">localToUTCTimeOfDay</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> -> (<a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a>, <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a>)</li><li class="src short"><a href="#v:timeToTimeOfDay">timeToTimeOfDay</a> :: <a href="Data-Time-Clock.html#t:DiffTime">DiffTime</a> -> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></li><li class="src short"><a href="#v:timeOfDayToTime">timeOfDayToTime</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> -> <a href="Data-Time-Clock.html#t:DiffTime">DiffTime</a></li><li class="src short"><a href="#v:dayFractionToTimeOfDay">dayFractionToTimeOfDay</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></li><li class="src short"><a href="#v:timeOfDayToDayFraction">timeOfDayToDayFraction</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> -> <a href="../base-4.5.1.0/Prelude.html#t:Rational">Rational</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:LocalTime">LocalTime</a> = <a href="#v:LocalTime">LocalTime</a> {<ul class="subs"><li><a href="#v:localDay">localDay</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a></li><li><a href="#v:localTimeOfDay">localTimeOfDay</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></li></ul>}</li><li class="src short"><a href="#v:utcToLocalTime">utcToLocalTime</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a> -> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></li><li class="src short"><a href="#v:localTimeToUTC">localTimeToUTC</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a> -> <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a></li><li class="src short"><a href="#v:ut1ToLocalTime">ut1ToLocalTime</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="Data-Time-Clock.html#t:UniversalTime">UniversalTime</a> -> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></li><li class="src short"><a href="#v:localTimeToUT1">localTimeToUT1</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a> -> <a href="Data-Time-Clock.html#t:UniversalTime">UniversalTime</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ZonedTime">ZonedTime</a> = <a href="#v:ZonedTime">ZonedTime</a> {<ul class="subs"><li><a href="#v:zonedTimeToLocalTime">zonedTimeToLocalTime</a> :: <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></li><li><a href="#v:zonedTimeZone">zonedTimeZone</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></li></ul>}</li><li class="src short"><a href="#v:utcToZonedTime">utcToZonedTime</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a> -> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></li><li class="src short"><a href="#v:zonedTimeToUTC">zonedTimeToUTC</a> :: <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a> -> <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a></li><li class="src short"><a href="#v:getZonedTime">getZonedTime</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></li><li class="src short"><a href="#v:utcToLocalZonedTime">utcToLocalZonedTime</a> :: <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></li></ul></div><div id="interface"><h1 id="g:1">Time zones </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TimeZone" class="def">TimeZone</a> </p><div class="doc"><p>A TimeZone is a whole number of minutes offset from UTC, together with a name and a "just for summer" flag. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TimeZone" class="def">TimeZone</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:timeZoneMinutes" class="def">timeZoneMinutes</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>The number of minutes offset from UTC. Positive means local time will be later in the day than UTC. </p></dd><dt class="src"><a name="v:timeZoneSummerOnly" class="def">timeZoneSummerOnly</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>Is this time zone just persisting for the summer? </p></dd><dt class="src"><a name="v:timeZoneName" class="def">timeZoneName</a> :: <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></dt><dd class="doc"><p>The name of the zone, typically a three- or four-letter acronym. </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:TimeZone" class="caption collapser" onclick="toggleSection('i:TimeZone')">Instances</p><div id="section.i:TimeZone" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Read.html#t:Read">Read</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../deepseq-1.3.0.0/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Time-Format.html#t:ParseTime">ParseTime</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Time-Format.html#t:FormatTime">FormatTime</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:timeZoneOffsetString" class="def">timeZoneOffsetString</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Text representing the offset of this timezone, such as "-0800" or "+0400" (like %z in formatTime) </p></div></div><div class="top"><p class="src"><a name="v:timeZoneOffsetString-39-" class="def">timeZoneOffsetString'</a> :: <a href="Data-Time-Format.html#t:NumericPadOption">NumericPadOption</a> -> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="../base-4.5.1.0/Data-String.html#t:String">String</a></p><div class="doc"><p>Text representing the offset of this timezone, such as "-0800" or "+0400" (like %z in formatTime), with arbitrary padding </p></div></div><div class="top"><p class="src"><a name="v:minutesToTimeZone" class="def">minutesToTimeZone</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></p><div class="doc"><p>Create a nameless non-summer timezone for this number of minutes </p></div></div><div class="top"><p class="src"><a name="v:hoursToTimeZone" class="def">hoursToTimeZone</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></p><div class="doc"><p>Create a nameless non-summer timezone for this number of hours </p></div></div><div class="top"><p class="src"><a name="v:utc" class="def">utc</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></p><div class="doc"><p>The UTC time zone </p></div></div><div class="top"><p class="src"><a name="v:getTimeZone" class="def">getTimeZone</a> :: <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></p><div class="doc"><p>Get the local time-zone for a given time (varying as per summertime adjustments) </p></div></div><div class="top"><p class="src"><a name="v:getCurrentTimeZone" class="def">getCurrentTimeZone</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></p><div class="doc"><p>Get the current time-zone </p></div></div><h1 id="g:2">Time of day </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:TimeOfDay" class="def">TimeOfDay</a> </p><div class="doc"><p>Time of day as represented in hour, minute and second (with picoseconds), typically used to express local time of day. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:TimeOfDay" class="def">TimeOfDay</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:todHour" class="def">todHour</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>range 0 - 23 </p></dd><dt class="src"><a name="v:todMin" class="def">todMin</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>range 0 - 59 </p></dd><dt class="src"><a name="v:todSec" class="def">todSec</a> :: <a href="../base-4.5.1.0/Data-Fixed.html#t:Pico">Pico</a></dt><dd class="doc"><p>Note that 0 <= todSec < 61, accomodating leap seconds. Any local minute may have a leap second, since leap seconds happen in all zones simultaneously </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:TimeOfDay" class="caption collapser" onclick="toggleSection('i:TimeOfDay')">Instances</p><div id="section.i:TimeOfDay" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Read.html#t:Read">Read</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../deepseq-1.3.0.0/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Time-Format.html#t:ParseTime">ParseTime</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Time-Format.html#t:FormatTime">FormatTime</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:midnight" class="def">midnight</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></p><div class="doc"><p>Hour zero </p></div></div><div class="top"><p class="src"><a name="v:midday" class="def">midday</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></p><div class="doc"><p>Hour twelve </p></div></div><div class="top"><p class="src"><a name="v:makeTimeOfDayValid" class="def">makeTimeOfDayValid</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -> <a href="../base-4.5.1.0/Data-Fixed.html#t:Pico">Pico</a> -> <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></p></div><div class="top"><p class="src"><a name="v:utcToLocalTimeOfDay" class="def">utcToLocalTimeOfDay</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> -> (<a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a>, <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a>)</p><div class="doc"><p>Convert a ToD in UTC to a ToD in some timezone, together with a day adjustment. </p></div></div><div class="top"><p class="src"><a name="v:localToUTCTimeOfDay" class="def">localToUTCTimeOfDay</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> -> (<a href="../base-4.5.1.0/Prelude.html#t:Integer">Integer</a>, <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a>)</p><div class="doc"><p>Convert a ToD in some timezone to a ToD in UTC, together with a day adjustment. </p></div></div><div class="top"><p class="src"><a name="v:timeToTimeOfDay" class="def">timeToTimeOfDay</a> :: <a href="Data-Time-Clock.html#t:DiffTime">DiffTime</a> -> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></p><div class="doc"><p>Get a TimeOfDay given a time since midnight. Time more than 24h will be converted to leap-seconds. </p></div></div><div class="top"><p class="src"><a name="v:timeOfDayToTime" class="def">timeOfDayToTime</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> -> <a href="Data-Time-Clock.html#t:DiffTime">DiffTime</a></p><div class="doc"><p>Find out how much time since midnight a given TimeOfDay is. </p></div></div><div class="top"><p class="src"><a name="v:dayFractionToTimeOfDay" class="def">dayFractionToTimeOfDay</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></p><div class="doc"><p>Get a TimeOfDay given the fraction of a day since midnight. </p></div></div><div class="top"><p class="src"><a name="v:timeOfDayToDayFraction" class="def">timeOfDayToDayFraction</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a> -> <a href="../base-4.5.1.0/Prelude.html#t:Rational">Rational</a></p><div class="doc"><p>Get the fraction of a day since midnight given a TimeOfDay. </p></div></div><h1 id="g:3">Local Time </h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:LocalTime" class="def">LocalTime</a> </p><div class="doc"><p>A simple day and time aggregate, where the day is of the specified parameter, and the time is a TimeOfDay. Conversion of this (as local civil time) to UTC depends on the time zone. Conversion of this (as local mean time) to UT1 depends on the longitude. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LocalTime" class="def">LocalTime</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:localDay" class="def">localDay</a> :: <a href="Data-Time-Calendar.html#t:Day">Day</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:localTimeOfDay" class="def">localTimeOfDay</a> :: <a href="Data-Time-LocalTime.html#t:TimeOfDay">TimeOfDay</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:LocalTime" class="caption collapser" onclick="toggleSection('i:LocalTime')">Instances</p><div id="section.i:LocalTime" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Read.html#t:Read">Read</a> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../deepseq-1.3.0.0/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Time-Format.html#t:ParseTime">ParseTime</a> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Time-Format.html#t:FormatTime">FormatTime</a> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:utcToLocalTime" class="def">utcToLocalTime</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a> -> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></p><div class="doc"><p>show a UTC time in a given time zone as a LocalTime </p></div></div><div class="top"><p class="src"><a name="v:localTimeToUTC" class="def">localTimeToUTC</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a> -> <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a></p><div class="doc"><p>find out what UTC time a given LocalTime in a given time zone is </p></div></div><div class="top"><p class="src"><a name="v:ut1ToLocalTime" class="def">ut1ToLocalTime</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="Data-Time-Clock.html#t:UniversalTime">UniversalTime</a> -> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></p><div class="doc"><p>1st arg is observation meridian in degrees, positive is East </p></div></div><div class="top"><p class="src"><a name="v:localTimeToUT1" class="def">localTimeToUT1</a> :: <a href="../base-4.5.1.0/Prelude.html#t:Rational">Rational</a> -> <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a> -> <a href="Data-Time-Clock.html#t:UniversalTime">UniversalTime</a></p><div class="doc"><p>1st arg is observation meridian in degrees, positive is East </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ZonedTime" class="def">ZonedTime</a> </p><div class="doc"><p>A local time together with a TimeZone. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ZonedTime" class="def">ZonedTime</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:zonedTimeToLocalTime" class="def">zonedTimeToLocalTime</a> :: <a href="Data-Time-LocalTime.html#t:LocalTime">LocalTime</a></dt><dd class="doc empty"> </dd><dt class="src"><a name="v:zonedTimeZone" class="def">zonedTimeZone</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a></dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ZonedTime" class="caption collapser" onclick="toggleSection('i:ZonedTime')">Instances</p><div id="section.i:ZonedTime" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Data.html#t:Data">Data</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Read.html#t:Read">Read</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="../deepseq-1.3.0.0/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Time-Format.html#t:ParseTime">ParseTime</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Time-Format.html#t:FormatTime">FormatTime</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:utcToZonedTime" class="def">utcToZonedTime</a> :: <a href="Data-Time-LocalTime.html#t:TimeZone">TimeZone</a> -> <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a> -> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></p></div><div class="top"><p class="src"><a name="v:zonedTimeToUTC" class="def">zonedTimeToUTC</a> :: <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a> -> <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a></p></div><div class="top"><p class="src"><a name="v:getZonedTime" class="def">getZonedTime</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></p></div><div class="top"><p class="src"><a name="v:utcToLocalZonedTime" class="def">utcToLocalZonedTime</a> :: <a href="Data-Time-Clock.html#t:UTCTime">UTCTime</a> -> <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="Data-Time-LocalTime.html#t:ZonedTime">ZonedTime</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>