@@ -69,9 +69,9 @@ App = {
69
69
} ) . watch ( function ( error , event ) {
70
70
71
71
if ( error === null ) {
72
- // console.log(App.subscriptionIndexCount, event.args._subscriptionIndex.toNumber())
72
+ console . log ( App . subscriptionIndexCount , event . args . _subscriptionIndex . toNumber ( ) )
73
73
if ( App . subscriptionIndexCount < event . args . _subscriptionIndex . toNumber ( ) ) {
74
- // console.log("["+ event.event+"]","Previous:", App.subscriptionIndexCount,", Current:", event.args._subscriptionIndex.toNumber());
74
+ console . log ( "[" + event . event + "]" , "Previous:" , App . subscriptionIndexCount , ", Current:" , event . args . _subscriptionIndex . toNumber ( ) ) ;
75
75
if ( App . subscriptionLoadingComplete ) {
76
76
App . subscriptionLoadingComplete = false ;
77
77
App . GetAllSubscriptions ( ) ;
@@ -154,7 +154,7 @@ App = {
154
154
App . contracts . Subscription . deployed ( ) . then ( function ( instance ) {
155
155
subscriptionInstance = instance ;
156
156
let closingTime = App . ReturnUTCTime ( ) + ( 1000 * 60 * App . subscriptionTimeInMin ) ;
157
- console . log ( "-NowInGMT-" , App . FormatDateTime ( App . ReturnUTCTime ( ) ) , "-TimeForEVM-" , App . FormatDateTime ( closingTime ) )
157
+ console . log ( "-NowInGMT-" , App . FormatDateTime ( App . ReturnUTCTime ( ) ) , "-TimeForEVM-" , App . FormatDateTime ( closingTime ) , "--RAW--" , closingTime ) ;
158
158
return subscriptionInstance . putSubscriptions ( closingTime , { from : App . account , value : web3 . toWei ( value , 'ether' ) } ) ;
159
159
} ) . then ( ( receipt ) => {
160
160
console . log ( receipt ) ;
@@ -200,18 +200,19 @@ App = {
200
200
subscriptionInstance . subscriptions ( i )
201
201
. then ( ( subscribe ) => {
202
202
let subscriberDt = subscribe [ 2 ] . toNumber ( ) ;
203
- console . log ( i , subscribe [ 1 ] , "TimeImMilliSeconds" , subscriberDt , "Time(EVM)" , App . FormatDateTime ( subscriberDt ) , "-NowInGMT-" , App . FormatDateTime ( App . ReturnUTCTime ( ) ) ) ;
203
+ console . log ( i , subscribe [ 1 ] , "TimeImMilliSeconds" , subscriberDt , "Time(EVM)" , App . FormatDateTime ( subscriberDt ) , "-NowInGMT-" , App . FormatDateTime ( App . ReturnUTCTime ( ) ) ) ;
204
+ console . log ( "[::Verify::]" , App . ReturnUTCTime ( ) , subscriberDt , ( App . ReturnUTCTime ( ) <= subscriberDt ) ) ;
204
205
/*let dt = new Date();
205
206
let offset = Math.round(subscriberDt - dt.getTimezoneOffset()*60*1000)
206
207
console.log("Offset: InMilliseconds", offset, "-ii-", App.FormatDateTime(offset))*/
207
208
208
- if ( App . ReturnUTCTime ( ) <= subscribe [ 2 ] . toNumber ( ) ) {
209
+ if ( App . ReturnUTCTime ( ) <= subscriberDt ) {
209
210
console . log ( "Subscription On!" , )
210
211
211
212
App . subscriptionArray . push ( {
212
213
'index' : subscribe [ 0 ] . toNumber ( ) ,
213
214
'creator' : subscribe [ 1 ] ,
214
- 'endDT' : subscribe [ 2 ] . toNumber ( )
215
+ 'endDT' : subscriberDt
215
216
} )
216
217
217
218
// User exist in the list of subscribers
0 commit comments