1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 01:57:02 +00:00

ui: Show dates in browser local timezone

This commit is contained in:
James Hillyerd
2018-11-23 16:47:22 -08:00
parent ba8e2de475
commit 6215ce77dd
4 changed files with 43 additions and 18 deletions

View File

@@ -14,6 +14,7 @@ import Json.Decode as D
import Json.Decode.Pipeline exposing (..)
import Json.Encode as E
import Ports
import Time
import Url exposing (Url)
@@ -22,6 +23,7 @@ type alias Session =
, host : String
, flash : String
, routing : Bool
, zone : Time.Zone
, persistent : Persistent
}
@@ -42,7 +44,13 @@ type Msg
init : Nav.Key -> Url -> Persistent -> Session
init key location persistent =
Session key location.host "" True persistent
{ key = key
, host = location.host
, flash = ""
, routing = True
, zone = Time.utc
, persistent = persistent
}
update : Msg -> Session -> ( Session, Cmd a )