common: Make CommitDate Unix epoch, handle legacy
authorShane Synan <digitalcircuit36939@gmail.com>
Wed, 20 Jun 2018 09:05:00 +0000 (04:05 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 20 Jun 2018 20:24:09 +0000 (22:24 +0200)
commitfa56ee7fc1b94ea27da6b27c919d6df1c0e0490d
tree818e83d0efeb7deccf73c15f4052fcabe9fda122
parentcb63e88d483f74c8f2f6e06c35c9d18be45cebaa
common: Make CommitDate Unix epoch, handle legacy

Leave CommitDate (BuildDate) in Unix epoch format, converting it on
demand when displayed.  This allows clients to localize the time
shown.

Add tryFormatUnixEpoch, which checks a string for Unix epoch, parsing
as date/time if possible, otherwise letting the string through.  This
avoids breaking protocol or any existing packaging scripts that set
commit date to a string.

Check for empty commit/build dates when using them, replacing with
"Unknown date" or "unknown" as appropriate.  Don't encode this in
Quassel::setupBuildInfo() to allow for location-specific treatment
and client-side translation.
src/common/quassel.cpp
src/common/util.cpp
src/common/util.h
src/core/coresessioneventprocessor.cpp
src/qtui/aboutdlg.cpp
src/qtui/coreinfodlg.cpp
src/qtui/coresessionwidget.cpp
version.h.in