all repos — honk @ cb5be283954b85a046b99ee1955a331919e23d08

my fork of honk

preserve event time information when editing
Ted Unangst tedu@tedunangst.com
Mon, 25 Oct 2021 13:45:30 -0400
commit

cb5be283954b85a046b99ee1955a331919e23d08

parent

a67dba5aae4ca5b9b72b30dcdbeb51ddf0f446cc

1 files changed, 8 insertions(+), 4 deletions(-)

jump to
M web.goweb.go

@@ -1396,8 +1396,10 @@ templinfo["Noise"] = noise

templinfo["SavedPlace"] = honk.Place if tm := honk.Time; tm != nil { templinfo["ShowTime"] = ";" - templinfo["StartTime"] = tm.StartTime.Format("2006-01-02 03:04") - templinfo["Duration"] = tm.Duration + templinfo["StartTime"] = tm.StartTime.Format("2006-01-02 15:04") + if tm.Duration != 0 { + templinfo["Duration"] = tm.Duration + } } templinfo["ServerMessage"] = "honk edit 2" templinfo["IsPreview"] = true

@@ -1711,8 +1713,10 @@ templinfo["Noise"] = r.FormValue("noise")

templinfo["SavedFile"] = donkxid if tm := honk.Time; tm != nil { templinfo["ShowTime"] = ";" - templinfo["StartTime"] = tm.StartTime.Format("2006-01-02 03:04") - templinfo["Duration"] = tm.Duration + templinfo["StartTime"] = tm.StartTime.Format("2006-01-02 15:04") + if tm.Duration != 0 { + templinfo["Duration"] = tm.Duration + } } templinfo["IsPreview"] = true templinfo["UpdateXID"] = updatexid