Fix typo in end time serialization
This commit is contained in:
parent
f9e90dab06
commit
791d606336
4 changed files with 8 additions and 8 deletions
|
@ -9,7 +9,7 @@ class TTConsts {
|
|||
static get SESSION_SERVER =>
|
||||
"https://api.zontreck.com/timetrack/$UPDATE_CHANNEL/timetrack.php";
|
||||
|
||||
static const VERSION = "1.0.0-beta.21";
|
||||
static const VERSION = "1.0.0-beta.22";
|
||||
|
||||
static bool UPDATE_AVAILABLE = false;
|
||||
static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta;
|
||||
|
|
|
@ -386,7 +386,7 @@ class SessionData {
|
|||
NbtUtils.writeBoolean(ct, "inprog", IsOnTheClock);
|
||||
// No need to write the contains trip times flag, it is set during deserialization. For inprog sessions, it will be set to true by the system.
|
||||
ct.put("start", StringTag.valueOf(StartTime.toIso8601String()));
|
||||
if (EndTime.year < 2000) {
|
||||
if (EndTime.year > 2000) {
|
||||
// We have a end time
|
||||
ct.put("end", StringTag.valueOf(EndTime.toIso8601String()));
|
||||
}
|
||||
|
@ -679,7 +679,7 @@ class Trip {
|
|||
CompoundTag ct = CompoundTag();
|
||||
|
||||
ct.put("start", StringTag.valueOf(StartTime.toIso8601String()));
|
||||
if (EndTime.year < 2000) {
|
||||
if (EndTime.year > 2000) {
|
||||
ct.put("end", StringTag.valueOf(EndTime.toIso8601String()));
|
||||
}
|
||||
|
||||
|
|
|
@ -54,22 +54,22 @@ class _WorkData extends State<WorkDataPage> {
|
|||
"Total saved GPS Positions: ${SessionData.positions.length}",
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
if (SessionData.StartTime.year != 0)
|
||||
if (SessionData.StartTime.year > 2000)
|
||||
Text(
|
||||
"Start Date & Time: ${SessionData.StartTime.toString()}",
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
if (SessionData.IsReadOnly && SessionData.StartTime.year != 0)
|
||||
if (SessionData.IsReadOnly && SessionData.StartTime.year > 2000)
|
||||
Text(
|
||||
"End Date & Time: ${SessionData.EndTime.toString()}",
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
if (SessionData.StartTime.year != 0)
|
||||
if (SessionData.StartTime.year > 2000)
|
||||
Text(
|
||||
"Total time worked: ${SessionData.GetTotalTimeWorked(SessionData.StartTime, SessionData.EndTime)}",
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
if (SessionData.StartTime.year == 0)
|
||||
if (SessionData.StartTime.year < 2000)
|
||||
ListTile(
|
||||
title: Text("ERROR"),
|
||||
subtitle: Text(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue