UTCTime

This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.
This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.
Coördinated universal time (UTCTime) is the most commonly used standard for civil timekeeping. It is synchronised with TAI (AbsoluteTime) and both tick in increments of SI seconds, but UTC includes occasional leap-seconds to keep it close to UT1 (UniversalTime).
> utcTime # UTCView (gregorian # YearMonthDay 2016 1 15) (timeOfDay # TimeOfDay 12 34 56.78)
2016-01-15 12:34:56.78 UTC

> UTCTime (gregorian # YearMonthDay 2016 1 15) (timeOfDay # TimeOfDay 12 34 56.78)
2016-01-15 12:34:56.78 UTC

> mkUTCTime 2016 1 15  12 34 56.78
2016-01-15 12:34:56.78 UTC
UTCTime is an AffineSpace with NominalDiffTime as its Diff. See Data.Thyme.Docs#spaces for details.
> let t0 = mkUTCTime 2016 1 15  23 59 0
> let t1 = mkUTCTime 2016 1 16  00  1 1
> let dt = t1 .-. t0
> dt
121s :: NominalDiffTime

> t1 .+^ dt
2016-01-16 00:03:02 UTC

> t1 .+^ 3 *^ dt
2016-01-16 00:07:04 UTC
To decompose a UTCTime into a separate Day and time-of-day, use utcTime. To convert to a local time zone, see zonedTime or utcLocalTime.

Notes

Internally UTCTime is just a 64-bit count of microseconds since the Modified Julian Day epoch, so (.+^), (.-.) et cetera ought to be fast. UTCTime cannot represent leap seconds. If leap seconds matter, use AbsoluteTime from Data.Thyme.Clock.TAI instead, along with absoluteTime' and UTCView for presentation.
Decode UTCTime
>>> input utcTime "2020-01-01T12:34:56+02:00"
2020-01-01 10:34:56 UTC
Convert the day and time part of the calendar to a UTCTime.
>>> import qualified Data.Text as T

>>> c1 <- calendar (T.pack "CET") (Locale "de_DE") TraditionalCalendarType

>>> show c1
2021-10-12 18:00:50

>>> utcTime c1
2021-10-12 16:00:50.544999999998 UTC
View UTCTime as an UTCView, comprising a Day along with a DiffTime offset since midnight. This is an improper lens: utcvDayTime outside the range of [zeroV, posixDayLength) will carry over into utcvDay, with the expected behaviour.
> view utcTime <$> getCurrentTime
UTCView {utcvDay = 2016-01-15, utcvDayTime = 49322.287688s}

> utcTime # UTCView (gregorian # YearMonthDay 2016 1 15) (timeOfDay # TimeOfDay 12 34 56.78)
2016-01-15 12:34:56.78 UTC
With {-# LANGUAGE ViewPatterns #-}, you can write: e.g.
f :: UTCTime -> (Day, DiffTime)
f (view utcTime -> UTCView day dt) = (day, dt)
Behaves as zonedTime, but converts any time zone offset into a UTC time.
Decode JSON string to UTCTime using Aesons's instance implementation
Encode JSON string to UTCTime using Aesons's instance implementation
xTyZ [ISO 8601:2004(E) sec. 4.3.2]
Output YYYY-MM-DD HH:MM:SS with an optional .SSS fraction part. Explicit timezone attribute is not appended as per SQLite3's datetime conventions.
ISO 8601:2004(E) sec. 4.3.2