Pebble.Time

Commands for reading watch time and timezone information.

Native Pebble C API

Time and timezone

DayOfWeek

type DayOfWeek
    = Monday
    | Tuesday
    | Wednesday
    | Thursday
    | Friday
    | Saturday
    | Sunday

Structured local time/date information from the watch runtime.

CurrentDateTime

type alias CurrentDateTime =
    { year : Int
    , month : Int
    , day : Int
    , dayOfWeek : DayOfWeek
    , hour : Int
    , minute : Int
    , second : Int
    , utcOffsetMinutes : Int
    }

Structured local time/date information from the watch runtime.

currentDateTime

currentDateTime : (CurrentDateTime -> msg) -> Cmd msg

Request the current local date/time with UTC offset in minutes.

currentTimeString

currentTimeString : (String -> msg) -> Cmd msg

Request the current local time string from the watch runtime.

clockStyle24h

clockStyle24h : (Bool -> msg) -> Cmd msg

Request whether the user is using 24-hour time.

timezoneIsSet

timezoneIsSet : (Bool -> msg) -> Cmd msg

Request whether timezone data is currently available.

timezone

timezone : (String -> msg) -> Cmd msg

Request the current timezone identifier string.