Installed

elm/browser
1.0.2
elm/core
1.0.5
elm/html
1.0.0
elm/svg
1.0.1
elm/time
1.0.0

Registry

elm/http
2.0.0
elm/random
1.0.0
elm/file
1.0.5
elm/json
1.1.3
evancz/elm-playground
1.0.3
elm-explorations/webgl
1.1.3
w0rm/elm-physics
5.1.3
rtfeldman/elm-css
18.0.0
mdgriffith/elm-ui
1.1.8
​x
    [ circle [ cx "200", cy "200", r "120", fill "#1293D8" ] []
 
1
-- Show an analog clock for your time zone.
2
--
3
-- Dependencies:
4
--   elm install elm/svg
5
--   elm install elm/time
6
--
7
-- For a simpler version, check out:
8
--   https://elm-lang.org/examples/time
9
--
10
​
11
import Browser
12
import Html exposing (Html)
13
import Svg exposing (..)
14
import Svg.Attributes exposing (..)
15
import Task
16
import Time
17
​
18
​
19
​
20
-- MAIN
21
​
22
​
23
main =
24
  Browser.element
25
    { init = init
26
    , view = view
27
    , update = update
28
    , subscriptions = subscriptions
29
    }
30
​
31
​
32
​
33
-- MODEL
34
​
35
​
36
type alias Model =
37
  { zone : Time.Zone
38
  , time : Time.Posix
39
  }
40
​
41
​
42
init : () -> (Model, Cmd Msg)
43
init _ =
44
  ( Model Time.utc (Time.millisToPosix 0)
45
  , Cmd.batch
46
      [ Task.perform AdjustTimeZone Time.here
47
      , Task.perform Tick Time.now
48
      ]
49
  )