Get Server Time

๐Ÿ“˜ Description

There may be a mismatch between the RGS-CWS server time and your server time. To synchronize properly (e.g. for expiry_date calculations), you can request the current RGS-CWS server time using this command and then add the necessary time adjustments to your code.

This helps ensure that timestamps (like session expiration) align with RGS-CWS expectations.


๐Ÿ“œSample JSON Request (from your server to the RGS-CWS server)

{"command":"25","apiusername":"admin123","apipass":"242aw5raw5a"}

๐Ÿ” Note: The input must be sent to the REST API URL, similarly to all the other commands. All field names and values are case-sensitive.


๐Ÿ“ฅ Input Parameters (from your server to the RGS-CWS server)

Parameter

Mandatory

Description

Type

*command

โœ…

Must be set to "25"

string

*apiusername

โœ…

API Username

string

*apipass

โœ…

API Password

string


๐Ÿ“ƒSample JSON Response (returned by CWS-RGS)

{ "status": "1", "server_time": "2025-07-04 14:52:00" }

๐Ÿ“ค Output Parameters (returned by CWS-RGS)

Parameter

Always included

Description

Type

status

โœ…

"1" for success, "0" for failure

string

server_time

โœ…

Current RGS-CWS server time in Y-m-d H:i:s format (GMT)

string