File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/main/java/io/api/etherscan/model Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,18 @@ public LocalDateTime getTimeStamp() {
6767 }
6868
6969 /**
70- *
71- * @return
70+ * Return the "timeStamp" field of the event record as a long-int representing the milliseconds
71+ * since the Unix epoch (1970-01-01 00:00:00).
72+ * @return milliseconds between Unix epoch and `timeStamp`. If field is empty or null, returns null
7273 */
7374 public Long getTimeStampAsMillis () {
7475 if (BasicUtils .isEmpty (timeStamp )) {
7576 return null ;
7677 }
77- return (timeStamp .charAt (0 ) == '0' && timeStamp .charAt (1 ) == 'x' )
78+ long tsSecs = (timeStamp .charAt (0 ) == '0' && timeStamp .charAt (1 ) == 'x' )
7879 ? BasicUtils .parseHex (timeStamp ).longValue ()
79- : Long .parseLong (timeStamp ) * 1000 ;
80+ : Long .parseLong (timeStamp );
81+ return tsSecs * 1000 ;
8082 }
8183
8284 public String getData () {
You can’t perform that action at this time.
0 commit comments