Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Rashmikapil1
Binge Watcher

roDateTime - wrong time stamp in VPN

Hi,

When connect to VPN network (US) we are getting wrong timestamp for 
return CreateObject("roDateTime").asSeconds(),

Any ways to solve this??
0 Kudos
5 REPLIES 5
RokuKC
Roku Employee
Roku Employee

Re: roDateTime - wrong time stamp in VPN

"Rashmikapil1" wrote:
Hi,

When connect to VPN network (US) we are getting wrong timestamp for 
return CreateObject("roDateTime").asSeconds(),


What exactly do you mean by wrong? Note that the value should be in UTC.

Is the date/time display in the Roku UI correct?
0 Kudos
Rashmikapil1
Binge Watcher

Re: roDateTime - wrong time stamp in VPN

The roDateTime Object is created and if we display the current time its showing old time...
e.g. 
dateTime = CreateObject("roDateTime")
print "time = “dateTime.AsDateString("long-date")
The output is :  time = Thursday November 29, 2018
The above is wrong date.

This happens only when connected to US VPN. In local network the date is correct
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: roDateTime - wrong time stamp in VPN

"Rashmikapil1" wrote:
The roDateTime Object is created and if we display the current time its showing old time...
e.g. 
dateTime = CreateObject("roDateTime")
print "time = “dateTime.AsDateString("long-date")
The output is :  time = Thursday November 29, 2018
The above is wrong date.

This happens only when connected to US VPN. In local network the date is correct


OK, but you didn't answer my question... is the date/time shown in the Roku UI correct?
E.g., if you go to Settings > System > Time > Time zone > Set automatically, does it have correct information?
(You can also see the date in Settings > System > System update, pick Check now and look at Last checked date/time).

I doubt this has anything to do with roDateTime. It seems more likely that your VPN is blocking Roku network services.
0 Kudos
Rashmikapil1
Binge Watcher

Re: roDateTime - wrong time stamp in VPN

The date/time was not displaying on roku device (after factory reset). After setting the date/time it is working correctly now. Thanks...
So date/time setting is required if its not displayed on device... 

Thank You..

Re: roDateTime - wrong time stamp in VPN

Thanks for resolving this issue, I really search and get this page on Search Engine, you guys really amazing skills, I cancel my VPN subscription for Roku because of this issue, but now again I subscribe. 

0 Kudos