Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
95494856
Commit
95494856
authored
May 18, 2017
by
Jeremy Bokobza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the unix time to be in seconds and not miliseconds
parent
0e28ba41
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
DateTimeOffsetConverter.cs
...c/Breeze.Wallet/JsonConverters/DateTimeOffsetConverter.cs
+2
-2
WalletManager.cs
Breeze/src/Breeze.Wallet/WalletManager.cs
+2
-2
No files found.
Breeze/src/Breeze.Wallet/JsonConverters/DateTimeOffsetConverter.cs
View file @
95494856
...
@@ -18,13 +18,13 @@ namespace Breeze.Wallet.JsonConverters
...
@@ -18,13 +18,13 @@ namespace Breeze.Wallet.JsonConverters
/// <inheritdoc />
/// <inheritdoc />
public
override
object
ReadJson
(
JsonReader
reader
,
Type
objectType
,
object
existingValue
,
JsonSerializer
serializer
)
public
override
object
ReadJson
(
JsonReader
reader
,
Type
objectType
,
object
existingValue
,
JsonSerializer
serializer
)
{
{
return
DateTimeOffset
.
FromUnixTime
Millis
econds
(
long
.
Parse
((
string
)
reader
.
Value
));
return
DateTimeOffset
.
FromUnixTime
S
econds
(
long
.
Parse
((
string
)
reader
.
Value
));
}
}
/// <inheritdoc />
/// <inheritdoc />
public
override
void
WriteJson
(
JsonWriter
writer
,
object
value
,
JsonSerializer
serializer
)
public
override
void
WriteJson
(
JsonWriter
writer
,
object
value
,
JsonSerializer
serializer
)
{
{
writer
.
WriteValue
(((
DateTimeOffset
)
value
).
ToUnixTime
Millis
econds
().
ToString
());
writer
.
WriteValue
(((
DateTimeOffset
)
value
).
ToUnixTime
S
econds
().
ToString
());
}
}
}
}
}
}
Breeze/src/Breeze.Wallet/WalletManager.cs
View file @
95494856
...
@@ -513,7 +513,7 @@ namespace Breeze.Wallet
...
@@ -513,7 +513,7 @@ namespace Breeze.Wallet
Amount
=
amount
,
Amount
=
amount
,
BlockHeight
=
blockHeight
,
BlockHeight
=
blockHeight
,
Id
=
transactionHash
,
Id
=
transactionHash
,
CreationTime
=
DateTimeOffset
.
FromUnixTime
Millis
econds
(
blockTime
??
time
),
CreationTime
=
DateTimeOffset
.
FromUnixTime
S
econds
(
blockTime
??
time
),
Index
=
index
Index
=
index
};
};
trans
.
Add
(
newTransaction
);
trans
.
Add
(
newTransaction
);
...
@@ -558,7 +558,7 @@ namespace Breeze.Wallet
...
@@ -558,7 +558,7 @@ namespace Breeze.Wallet
// update the block time
// update the block time
if
(
blockTime
!=
null
)
if
(
blockTime
!=
null
)
{
{
foundTransaction
.
CreationTime
=
DateTimeOffset
.
FromUnixTime
Millis
econds
(
blockTime
.
Value
);
foundTransaction
.
CreationTime
=
DateTimeOffset
.
FromUnixTime
S
econds
(
blockTime
.
Value
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment