Community
 
 
 

CloudPortal Business Manager 2.x

324 abonnés
 
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 commentaires
0

Vous devez vous connecter pour laisser un commentaire.

 
 

Previous 2 commentaires

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
Actions pour les commentaires Permalien
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
Actions pour les commentaires Permalien

Top Contributors