Community
 
 
 

CloudPortal Business Manager 2.x

팔로워 324명
 
Avatar
Pankaj Paliwal

Calculating BSS API TimeStamp on Windows

Avatar

Calculating BSS API TimeStamp on Windows

The BSS API docs explain that REST requests need to include a timestamp.

 

The timestamp is the system clock in milliseconds.  However, the system clock in Windows uses a different epoch than Linux / Unix.

 

Do you have any advice on how to calculate the timestamp from a Windows system clock?


Donal Lafferty CITRIX EMPLOYEES
댓글 2개
0

댓글을 남기려면 로그인하세요.

 
 

Previous 댓글 2개

Avatar
Pankaj Paliwal
Avatar

Calculating BSS API TimeStamp on Windows

This should probably work:

 

// Based on example from http://www.epochconverter.com/
var cpbmTime = (DateTime.UtcNow - new DateTime(197011)).TotalMilliseconds;


Donal Lafferty CITRIX EMPLOYEES
댓글 작업 고유 링크
Avatar
Pankaj Paliwal
Avatar

Hi Donal,

 

BSS API expect timestamp to be in milli seconds.

 

If you are Executing BSS API from java you can use

 

long timeStamp = System.currentTimeMillis(); //i have tested this on unix and windows .

 

but looks like you are using VB.Net and  in this case your solution should work.

 

Please let me know if you any further question.

 

Thanks,

Naveen


Naveen Jain CITRIX EMPLOYEES
댓글 작업 고유 링크

Top Contributors